Problem in using PNG files....

Hi everybody...

Whenever i use ImageIo.read(filename) function to read a PNG file....it returns a bufferedImage with Type = 0....

and i cannot use this type of image to perform convolution operations....

how can i solve this?....

Another problem is that whenever i save it using the write method....the size of the new file is way too large than original image.

( ex - 250 kb(source image) - 1.5Mb(saved image))

how can i solve this?

plzz someone help me...

itz urgent!!

[525 byte] By [rav_ahja] at [2007-11-26 21:04:37]
# 1

I'm making educated guesses here but I suspect you may be loading a palettised (ie <16M color) file and convolution probably requires true color - you can convert by creating a new image and rendering into it.

As for writing out, you can adjust the write settings by tailoring the relevant ImageWriteParams... there should be plenty of info around if you Google.

itchyscratchya at 2007-7-10 2:37:45 > top of Java-index,Desktop,Core GUI APIs...