Hi,
I am tryign to convert a .png image to .jp format with the following changes -
Resize image to 1920x1080 (to correct aspect ratio)
Adjust gamma to 1.26 (Photoshop value)
Save as 320x240 (cropping sides off to fit) JPEG
The actual size of the image is - 1280 X 1080
For this i am using the following command -
convert -size 1920 X 1080 Original.png -gamma 1.26 -resize 320X420 convert1.jpg
The image is converted but the image size is - 284 X 240.
This does not meet my requirement.
Please help...
resizing does not work properly
Re: resizing does not work properly
RTM. You need to add ! to your resize (e.g. 320X420!) otherwise the aspect ratio of the image is maintained.
Re: resizing does not work properly
The resizing worked well. But i have to correct the aspect ratio to 1920 X 1080. The actual Image size is - 1280 x 1080. I was tring to correct the aspect ration to 1920 X 1080 in the same command in which i want to resize the image.
What shall i do to manage correcting the aspect ration as well as resizing the image at the sametime.
What shall i do to manage correcting the aspect ration as well as resizing the image at the sametime.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: resizing does not work properly
Exactly as 'magick' described. Add an '!' to the resize option argument.
It forces it to resize the image to the exact dimensions given. You may need to add a backslash or quote the '!' character as many command line shells use it for history substitution.
It forces it to resize the image to the exact dimensions given. You may need to add a backslash or quote the '!' character as many command line shells use it for history substitution.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/