Re: Transparent png

Arkadi Colson <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Organization Smartbit bvba
Message-ID <[email protected]>
Ah ok. It's that simple :-). Are you going to implement it in one of the 
next versions or what's the next step?

Thanks already for your effort!


On 24-05-17 11:19, Robin Becker wrote:
> OK it turns out to be LA which is kind of what I suspected.
>
>
>
>
> On 24/05/2017 09:22, Arkadi Colson wrote:
>> Hi
>>
>> I'm not really sure how to get the mode. I attached the image. 
>> Perhaps you can
>> give it a try?
>> Thanks a lot!
>>
> in python
>
> C:\code\hg-repos\reportlab\tmp>python
> Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC 
> v.1500 64 bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from PIL import Image
> >>> im=Image.open('gray-alpha.png')
> >>> im.mode
> 'LA'
> >>>
>
>
>
>> Arkadi
>>
>>
>> On 24-05-17 10:01, Robin Becker wrote:
>>>
>>> On 24/05/2017 08:17, Arkadi Colson wrote:
>>>> I tried it and the result is this:
>>>>
>>>> The black square should be a transparent image and looks like this:
>>>>
>>>> Both are png images.
>>>> The first one which is appearing correctly is "PNG image data, 48 x 
>>>> 48,
>>>> 8-bit/color RGBA, non-interlaced". The black square is "PNG image 
>>>> data, 48 x 48,
>>>> 8-bit gray+alpha, non-interlaced".
>>>>
>>>> Any idea why the "gray+alpha" isn't showing up correctly?
>>>>
>>>> Thx!
>>>>
>>>
>>> Hi Arkadi,
>>>
>>> I'm almost sure that we don't support lots of stuff regarding colour 
>>> mappings
>>> especially with images.
>>>
>>> Since PNG is not native for PDF I think we're just doing this for PNG
> .........
>>>>> that means.
>>>>>
>>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.