Uploaded image for project: 'Commons Imaging'
  1. Commons Imaging
  2. IMAGING-139

Invalid DPI value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.97
    • None
    • Format: JPEG
    • None

    Description

      I have following code in my java program

      final String IMAGE_PATH = "c:\\test\\250dpi.jpg";
      byte imageBytes[] = readImageBytes(IMAGE_PATH);
      
      final ImageInfo imageInfo = Sanselan.getImageInfo(imageBytes);
      final int physicalWidthDpi = imageInfo.getPhysicalWidthDpi();
      final int physicalHeightDpi = imageInfo.getPhysicalHeightDpi();
      
      System.out.println("physicalWidthDpi:"+physicalWidthDpi);
      

      When I right click image it showing 250 DPI value,but above program returning DPI value -1.

      Not sure why?Can u please help how to get image correct DPI value.

      Attached image for your reference.

      Attachments

        1. 250dpi.jpg
          151 kB
          prabu

        Activity

          People

            Unassigned Unassigned
            prabumca06@gmail.com prabu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: