You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Chris Carman (JIRA)" <ji...@apache.org> on 2014/11/16 18:44:34 UTC

[jira] [Commented] (IMAGING-139) Invalid DPI value

    [ https://issues.apache.org/jira/browse/IMAGING-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14213982#comment-14213982 ] 

Chris Carman commented on IMAGING-139:
--------------------------------------

I see the same problem occurring for PNG images created by the Mac's screenshot tool.

File:
  Name = Screen Shot 2014-10-19 at 10.40.21 AM.png
  Size = 2998896
  Path: Desktop/Screen Shot 2014-10-19 at 10.40.21 AM.png

Dimensions:
  Width  = 1920
    Physical Width: -1 (-1.0 inches)
  Height = 1080
    Physical Height: -1 (-1.0 inches)



> Invalid DPI value 
> ------------------
>
>                 Key: IMAGING-139
>                 URL: https://issues.apache.org/jira/browse/IMAGING-139
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: Format: JPEG
>    Affects Versions: 0.97
>            Reporter: prabu
>         Attachments: 250dpi.jpg
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)