Java ImageIO: Can I convert PNG-24 to PNG-8?

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

The problem is that IE6 does not support transparent PNG. I tried several client solutions, but all of them do not correspond to one aspect or another (most of them do not support the css property background-repeat).

I am looking for an alternative solution for creating two separate images on a server, one for modern, transparent-png-compatible browsers and one for IE6.

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

+3
source share
2 answers

If you need transparency in IE6, then consider GIF delivery instead of this browser. Would that be possible?

+1
source

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

(if you have already tried, feel free to comment, I will delete the answer)

0
source

Source: https://habr.com/ru/post/1728829/


All Articles