mortennobel / java-image-scaling

Automatically exported from code.google.com/p/java-image-scaling
Other
130 stars 41 forks source link

Color misinterpreted on PNG type 6 #39

Open Smithfields opened 8 years ago

Smithfields commented 8 years ago

Color misinterpreted on PNG type 6

Hi, here's the issue I'm facing :

INPUT

BufferedImage@113a3944: type = 6 ColorModel: #pixelBits = 32 numComponents = 4 
color space = java.awt.color.ICC_ColorSpace@7d69b2b1 transparency = 3 has alpha = true isAlphaPre = false 
ByteInterleavedRaster: width = 1208 height = 1206 #numDataElements 4 dataOff[0] = 3

OUTPUT (thumbnail method)

BufferedImage@27e90f75: type = 2 
DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=ff000000 
IntegerInterleavedRaster: width = 160 height = 160 #Bands = 4 xOff = 0 yOff = 0 dataOffset[0] 0

I tried to pass a destination Buffered Image instead of a null arg. But it didn't help.

Issue visually speaking :

origin:

unixstickers.com/image/cache.../copyleft_bumper.sh-600x600.png

processed:

elliptic.s3.amazonaws.com/gamingart/user/d136186...cd364a9c7.jpg

another altered output:

Mad Max in-game Screenshot

I'm also taking this chance to thank you for this library, an exceptionnal tool.