I am working on image interpolation for which I am using bi-cubic interpolation to double the resolution of image in java using AffinedTransformOp
.I used BufferedImage
of TYPE_4BYTE_ABGR
while doing up-scaling. When I tried to save back my upscale image using ImageIO.write
then I found that openjdk does not support jpeg
encoding for TYPE_4BYTE_ABGR
so I converted this up-scaled image from TYPE_4BYTE_ABGR
to TYPE_3BYTE_BGR
. When I saved it in folder then found that the memory taken by this upscale image is way less(about half time) than the memory taken by original image.
So I assume that the original(input) image is represented by four channels ARGB
while upscale(output) image is taking 3 channels RGB
and that's why getting less memory.
Now my question is that should I use this conversion?
Is there some information that is getting lost?
Does quality of image remains same?
P.S: I've read from the documentation of ImageIO
that when we convert ARGB
to RGB
than the alpha value gets premultiplied to RGB
values and I think it should not affect the quality of the image.