Resize image
I need to resize image. The file size is 2272x1704 JPEG format. I want to resize to size 320x240.
/usr/bin/X11/convert -size 100X100 file.jpeg -resize 340x240 file.jpeg The result after is wrong size. Any ideas what is wrong with the command? |
There's nothing wrong with the command. But convert does keep the aspect ratio of the original picture. You can 'force' convert to calculate the correct ratio:
convert -size 1463x973 example.jpg -resize 640 example.resized.jpg will give you a resized picture that is 640 (you provided this) by 426 (calculated by convert) convert -size 1463x973 example.jpg -resize 640x480 example.resized.jpg Will have the same result....... |
Quote:
/usr/bin/convert -size 1704x2272 example.JPEG -resize 320x240 example.jpeg The result of this is picture 240x180 .. What I'm doing wrong ? I need picture 320x240 Thanks |
LOL
2272x1704 or 1704x2272 which one is it??? 2272x1704 = 4:3 = 320x240 1704x2272 = 3:4 = 240x320 convert -size 2272x1704 example.JPEG -resize 320x240 example.jpeg convert -size 1704x2272 example.JPEG -resize 240x320 example.jpeg Hope this helps. |
Quote:
I need picture of size 320x240. No matter what , after I resize picture I got picture 240x320.. convert -size 1704x2272 example.jpg -resize 320x240 example.jpeg convert -size 1704x2272 temp.jpg -resize 240x320 temp.jpeg |
Like I said before, convert respects the ratio of the original image. It cannot do what you ask for.
Use mogrify (from the same ImageMagic toolkit). mogrify -resize 340x320 inputfile.jpg You might have noticed the lack of an outputfile.jpg. There is none. The original is overwritten! |
All times are GMT -5. The time now is 02:44 PM. |