I am trying to resize jpg Image files in Java. For this I am using Scalr. I have around 16MB image with 6000×4000 Resolution and 350 dpi. When I resize it to 4500 width, it downscales the DPI also to 96. This is the code I am using: I tried it without any library with the code as: But the