dataflowg / g-image

A LabVIEW image library.
The Unlicense
6 stars 3 forks source link

Support for Transparency #6

Closed ItsMeAshiq closed 1 year ago

ItsMeAshiq commented 1 year ago

Currently the Save Animated GIF Image.vi is writing all the frames replacing the Transparent background with white solid color. image

I believe it is coming straightly from the gif.h library implementation.

I think we can do something about it to bring the Transparency support, image

dataflowg commented 1 year ago

Thanks for the suggestion @ItsMeAshiq. I think a gif file indicates whether it has transparency or not, and what color in the palette to use as the transparent color. So there might need to be some extra logic to convert a LabVIEW picture with 256 colors + mask to a 255 color + transparent color. There might also need to be a tweak to the frame disposal method of the animated gif. Definitely a feature that should be supported though :+1:

dataflowg commented 1 year ago

Added in v0.5.0. Transparency is applied using either the alpha channel in a 32-bit image, or from the mask in a 8-bit or 24-bit image.