06:02 pm - shamansoft - 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: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?
09:58 pm - ska_o - JScrollPane question Is there a simple way to configure JScrollPane so that it forces the horizontal size of its parent on its contents? I need to scroll only vertically and display the full width.Update: I figured it out. The child component (viewport view) needs to implement the interface Scrollable, whose method getScrollableTracksViewportWidth() needs always to return true.