How to write the java code to save the PNG with interlaced (1, Adam7)?

488 Views Asked by At

I need to write some java code to save the PNG Image with the interlaced=1, which is Adam7.

I tried to use the PNGJ lib to help to do it, but I cannot find some sample code to do it.

Any one can help me with it?

1

There are 1 best solutions below

1
On BEST ANSWER

It seems like PNGJ is not able to save interlaced images.

From the PNGJ wiki

Interlaced images can be read (though in that case the row-by-row read is not efficient), but they are writen as non-interlaced.

Have a look at JavaPNG or Commons Imaging.