3

The scenario is this: Users of the webapp can customize the website by choosing their own logo image, background colors and background images.

Problem is that IE6 does not support transparent PNG. I've tried several client-side solutions, but all fall short on one aspect or the other (most don't support the css property background-repeat).

I'm looking for the alternate solution of creating two separate images on the server, one for modern, transparent-png-compliant browsers and one for IE6.

Question is, can I accomplish this with ImageIO? Basically, I would detect whether the image is in PNG-24 format and convert it to PNG-8 (which is supported on IE6).

Dan
  • 9,912
  • 18
  • 49
  • 70

2 Answers2

1

If you need transparency in IE6, then consider simply shipping a GIF instead for that browser. Would that be feasible?

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347
  • Yes, that could work... is it easier to accomplish? (Can I still have some transparency left in the GIF?) – Dan Jan 17 '10 at 18:31
  • http://ubuntuforums.org/showthread.php?t=1060128 discusses using Java ImageIO to convert a PNG to a GIF. – Walter Rumsby Jun 28 '11 at 08:34
0

I know you said you used various client-side solutions, but this one worked in the project I was using, so just in case : http://jquery.andreaseberhard.de/pngFix/

(if you already tried it, feel free to comment, I'll delete the answer)

Valentin Rocher
  • 11,667
  • 45
  • 59
  • It says on the page that it supports 'css backgrounds (but scaling backgrounds)', which means -- judging on previous experience with other scripts -- that it doesn't deal with background-repeat but rather stretches the image. – Dan Jan 17 '10 at 18:30