commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IMAGING-139) Invalid DPI value
Date Mon, 29 Dec 2014 11:03:14 GMT

     [ https://issues.apache.org/jira/browse/IMAGING-139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benedikt Ritter updated IMAGING-139:
------------------------------------
    Description: 
I have following code in my java program

{code:java}
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);
{code}

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.

  was:
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.


> 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
> {code:java}
> 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);
> {code}
> 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)

Mime
View raw message