Re: Importing GIF looses transparency (w/ConstituteImage)

Carl-Einar Thorner <[email protected]> Thu, 15 Oct 2020 09:42:58 -0700
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <CAHTaVWBVct1ccbnu=c4ueKFRxBcN4AAJEm2kq4QYNyq0cQnrzA@mail.gmail.com>
That would be magical. I opened a feature request(#60) for
ImportImagePixels.

https://sourceforge.net/p/graphicsmagick/feature-requests/60/

Thanks,
Carl

On Wed, Oct 14, 2020 at 10:52 AM Bob Friesenhahn <
[email protected]> wrote:

> On Mon, 12 Oct 2020, Carl-Einar Thorner wrote:
> >
> > It seems to me that vips passes the correct parameters for the mapping,
> but
> > I'm stumped on where to go from here.
> >
> > Is there a bug in GraphicsMagick or is VIPS calling ConstituteImage
> wrong?
>
> I suspect that all that is needed is to set 'image->matte = MagickTrue';
>
> A possible approach is to do 'image->matte = constitute_image->matte'.
>
> You do need to pay attention to what might already be in the image
> opacity chanel when you enable matte since it appears that not all
> pixels may be over-written. By default, an image opacity channel is
> initialized to opaque(0).
>
> The underlying implementation of CopyCompositeOp is
> CopyCompositePixels in magick/composite.c.  There you can see that a
> check is made on the 'matte' flags for both images.
>
> Libvip's implementation of magick_import_pixels() does not appear to
> be very efficient since it is creating a temporary image.
>
> If someone would submit a feature request to implement
> ImageMagick-compatible ImportImagePixels() in the GraphicsMagick
> tracker at SourceForge, then I might find time to implement it
> properly.
>
> Bob
> --
> Bob Friesenhahn
> [email protected], http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
> Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt
>
>
> _______________________________________________
> 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