determining the pixel aspect ratio of a TIFF
-
- Posts: 5
- Joined: 2018-06-19T11:58:22-07:00
- Authentication code: 1152
determining the pixel aspect ratio of a TIFF
Hi there, this is a little out of my domain so please bear with me. I have a TIFF image coming out of an in house application and the issue seems to be that, while the size of the image is correct (1024 x 768), the pixel aspect ratio is not. How do I measure this using ImageMagick for Windows? I had heard this tool could do it, but I am not sure how. Thanks in advance.
Last edited by easyhtrees on 2018-06-19T12:41:55-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: determining the pixel aspect ration of a TIFF
What do you mean by pixel aspect ratio? Do you mean the width/height ratio of the image where the width and height are in pixels? If so, then
If on IM 7, then use magick rather than convert.
____________________________
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620
For novices, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
Code: Select all
convert image.tiff -format "%[fx:w/h]\n" info:
____________________________
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620
For novices, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
-
- Posts: 5
- Joined: 2018-06-19T11:58:22-07:00
- Authentication code: 1152
Re: determining the pixel aspect ration of a TIFF
Thanks for the response. My understanding is that 'Pixel Aspect Ratio' refers to the ratio of the pixel's width to its height. I should clarify that the above doesn't give me that information.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: determining the pixel aspect ratio of a TIFF
Please link to a sample TIFF with non-unity pixel aspect ratio. Then we can try a few things.easyhtrees wrote:How do I measure this using ImageMagick for Windows?
snibgo's IM pages: im.snibgo.com
-
- Posts: 5
- Joined: 2018-06-19T11:58:22-07:00
- Authentication code: 1152
Re: determining the pixel aspect ratio of a TIFF
Here is an upload: https://imgur.com/hPq53nZ
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: determining the pixel aspect ratio of a TIFF
You asked about TIFF, but the link is to a PNG?
"hPq53nZ - Imgur.png" seems to have square pixels.
But I've remembered how pixel aspect ratio is recorded: in the density. Square pixels (the normal situation) have equal densities in x and y. Non-square have unequal densities.
"hPq53nZ - Imgur.png" seems to have square pixels.
But I've remembered how pixel aspect ratio is recorded: in the density. Square pixels (the normal situation) have equal densities in x and y. Non-square have unequal densities.
snibgo's IM pages: im.snibgo.com
-
- Posts: 5
- Joined: 2018-06-19T11:58:22-07:00
- Authentication code: 1152
Re: determining the pixel aspect ratio of a TIFF
Is there a better image hosting site I can use? It's TIFF on disk, I don't know how it ended up being a PNG.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: determining the pixel aspect ratio of a TIFF
Don't use an image hosting website. They often convert the image to something else for display. Some allow the original to be downloaded, but some discard the original.
Instead, use a file hosting site. dropbox.com seems to work fine.
But you can do the test yourself:
Look for a line like "Resolution: 200x100"
Instead, use a file hosting site. dropbox.com seems to work fine.
But you can do the test yourself:
Code: Select all
magick identify -verbose yourfile.tiff
snibgo's IM pages: im.snibgo.com
-
- Posts: 5
- Joined: 2018-06-19T11:58:22-07:00
- Authentication code: 1152
Re: determining the pixel aspect ratio of a TIFF
I just tried that and sure enough, the AR is not 1. Thanks, I'll use this method for now.
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: determining the pixel aspect ratio of a TIFF
This should give you both X and Y resolutions...easyhtrees wrote: ↑2018-06-19T15:33:54-07:00I just tried that and sure enough, the AR is not 1. Thanks, I'll use this method for now.
Code: Select all
magick input.tif -format "%[fx:resolution.x] %[fx:resolution.y]" info:
Code: Select all
magick input.tif -format "%[fx:resolution.x/resolution.y]" info: