Re: Transparency error when converting a png to bmp

张铎 <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <CAAAYAnP3ythx7SQUBd0UrHU2qrKYdUCNpeG-ATuBqwgFtsba0A@mail.gmail.com>
Thanks! So will it be fixed in the next release?

2015-08-17 21:29 GMT+08:00 Bob Friesenhahn <[email protected]>:

> On Mon, 17 Aug 2015, 张铎 wrote:
>
>>
>> Modify coders/bmp.c, change line 1736 from
>> *q++=ScaleQuantumToChar(p->opacity); to
>> *q++=MaxRGB-ScaleQuantumToChar(p->opacity);
>>
>> It fix my problem but I'm not sure whether it is the right approach.
>>
>
> This is likely a more appropriate fix:
>
>             if (bmp_info.bits_per_pixel == 32)
>               *q++==ScaleQuantumToChar(MaxRGB-p->opacity);
>
> since otherwise there will be a problem for anything but the Q8 build.
>
> The alpha channel is inverted in GraphicsMagick from the way it is stored
> in most file formats.
>
> Bob
> --
> Bob Friesenhahn
> [email protected], http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Graphicsmagick-help mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
>
>

------------------------------------------------------------------------------

_______________________________________________
Graphicsmagick-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
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.