Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.97, 1.0-alpha1, 1.1, 1.x
-
None
-
Any
Description
How I can to set DPI for PNG image?
File inImgFile = new File("in.png"); File outImgFile = new File("out.png"); BufferedImage image = Sanselan.getBufferedImage(inImgFile); // ImageInfo imageinfo = Sanselan.getImageInfo(inImgFile); // imageinfo.getPhysicalHeightDpi(): returned 300 // imageinfo.getPhysicalWidthDpi(): returned 300 // Sanselan.getMetadata(inImgFile): returned null ImageFormat format = ImageFormat.IMAGE_FORMAT_PNG; Sanselan.writeImage(image, outImgFile, format, params); // imageinfo = Sanselan.getImageInfo(outImgFile); // imageinfo.getPhysicalHeightDpi(): returned -1 // imageinfo.getPhysicalWidthDpi(): returned -1
Thanks.