You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dots-per-inch (DPI) information is metadata that's kept in certain file formats to instruct how an image should be printed. It doesn't actually affect the contents of the image file itself (i.e., the pixels.)
As Thumbnailator deals with the dimensions in pixels only, setting the scaling to 1x (i.e. .scale(1f)) will end up with the same number of pixels before and after the transformation. This is intended behavior.
Expected behavior
300dpi tiff image when change to jpg keep dpi and pixel
Actual behavior
tiff dpi=300dpi pixel=1181 x 1181
image convert to
jpg dpi=96dpi pixel=1181 x 1181
Steps to reproduce the behavior
BufferedImage tif = ImageIO.read(new File("D:\\868602602.tif")); Thumbnails .of(tif) .outputFormat("jpg") .scale(1f) .outputQuality(1f) .toFile(new File("D:\\868602602.jpg"));
Environment
windows 11
1.8.0_40
0.4.19
2211180344517.zip
The text was updated successfully, but these errors were encountered: