1952Re: imgfile= draws black for transparency in PNGs
- Nov 15, 2006
> I'm using a proc scatterplot with a 'symbol imgfile=' statement. The symbolThanks to Jamie Echlin for finding the problem: the background of my PNG
> image is (in one case) a PNG of a green diamond on a transparent background:
> http://home.comcast.net/~andrex/bugz/diamond-green-none.png .
> Although the background is transparent, when ploticus substitutes the image
> into the plot, the background is rendered in black: see e.g.
> http://home.comcast.net/~andrex/bugz/imgfile.png . In that image, the very
> same green diamond referenced above has been plotted in the middle section
> of the graph, and as you can see the background has come out black in every
images wasn't properly tagged as transparent. Funny, because it showed up
as transparent in both gimp and Firefox.
The solution was to open the images up in gimp again, change the colormap
mode from RGB to indexed, and resave the image. When I did that the
transparency was properly recorded. I don't know enough about PNG and
colormaps to understand why, but it worked. Thanks Jamie.
- << Previous post in topic Next post in topic >>