image processing
Help!
I need to decrease the image size, but I should save its resolution.
i.e. there is an image 2448x3264 pixels, resolution 300dpi, I should get the similar image 260x343pixels and 300dpi.
I tried to use this part of code:
It decrease the size, but it changes the resolution to 96dpi.
So the main problem is to set up the picture's resolution to 300dpi. Have you any ideas?
I need to decrease the image size, but I should save its resolution.
i.e. there is an image 2448x3264 pixels, resolution 300dpi, I should get the similar image 260x343pixels and 300dpi.
I tried to use this part of code:
BufferedImage original = decoder.decodeAsBufferedImage(); Image scaledImage = original.getScaledInstance( 260, 343, BufferedImage.SCALE_AREA_AVERAGING ); BufferedImage result =new BufferedImage( 260, 343, BufferedImage.TYPE_INT_RGB );
It decrease the size, but it changes the resolution to 96dpi.
So the main problem is to set up the picture's resolution to 300dpi. Have you any ideas?
