Loading ...
Sorry, an error occurred while loading the content.

1952Re: imgfile= draws black for transparency in PNGs

Expand Messages
  • Andrew Schulman
    Nov 15, 2006
    • 0 Attachment
      > I'm using a proc scatterplot with a 'symbol imgfile=' statement. The symbol
      > 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
      > case.

      Thanks to Jamie Echlin for finding the problem: the background of my PNG
      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.
    • Show all 3 messages in this topic