Everybody should know the Photoshop's PAR correction. Does anybody know do imagemagick has the same feature (command-line) or not?
Thank you, Dmitry.
Pixel aspect ratio correction
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Pixel aspect ratio correction
Not everybody has or uses Photoshop or is even familiar with pixel aspect ratios.
Nevertheless, this is only important if you want to convert between digital still images or digital images for video. Still images generally use square pixels. Digital video uses non-square pixels, typically with aspect ratios of 4:3, 3:2 or 2:1. These happen to match the dimensions and image aspect ratios of some cameras (presumably so that the digital video is square). A good article is at http://www.videouniversity.com/articles ... and-tricks.
First, I don't think that IM has the ability to recognize pixel aspect ratios in the headers of files. I could be wrong. I also don't think it can automatically change the pixel aspect ratio for you.
However, if you know the pixel aspect ratio and want to change it from square to that aspect ratio or go the other way, then all you need to do is create a new image whose size is changed by that aspect ratio. So for example if you want to go from square to 3:2 aspect ratio, then
convert squareimage.jpg -resize 150% rectangularimage.jpg
where 3:2 is equivalent to 3/2=1.5 or 150%
Nevertheless, this is only important if you want to convert between digital still images or digital images for video. Still images generally use square pixels. Digital video uses non-square pixels, typically with aspect ratios of 4:3, 3:2 or 2:1. These happen to match the dimensions and image aspect ratios of some cameras (presumably so that the digital video is square). A good article is at http://www.videouniversity.com/articles ... and-tricks.
First, I don't think that IM has the ability to recognize pixel aspect ratios in the headers of files. I could be wrong. I also don't think it can automatically change the pixel aspect ratio for you.
However, if you know the pixel aspect ratio and want to change it from square to that aspect ratio or go the other way, then all you need to do is create a new image whose size is changed by that aspect ratio. So for example if you want to go from square to 3:2 aspect ratio, then
convert squareimage.jpg -resize 150% rectangularimage.jpg
where 3:2 is equivalent to 3/2=1.5 or 150%
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Pixel aspect ratio correction
Fred you need the \! flag for aspect ratio changes...
Code: Select all
-resize 150x100%\!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Pixel aspect ratio correction
anthony wrote:Fred you need the \! flag for aspect ratio changes...Code: Select all
-resize 150x100%\!
Right and I also forgot the other dimension. Your formula is correct.