LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-28-2009, 04:39 PM   #1
beli0135
Member
 
Registered: Jul 2008
Posts: 39

Rep: Reputation: 15
convert -resize question


Hi all

I am using ImageMagic's convert to resize images. It has a lots of parameters so I am bit lost..

for example to resize image to 800x600 I use:
convert -resize 800x600

that is OK, but when image is "portrait", it resizes is to Cx600 where C is calculated. That is not desired effect.
It should resize landscape images to 800x600 and Portrait images to 600x800

how do I make that? which parameter?

Thanks
 
Old 11-28-2009, 05:58 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
I just came across this need the other day. The secret was to look at the documentation concerning the -resize option, which led me to the details about the image geometry settings.

If the original images already have the aspect ratio you want, then just set both numbers to the maximum value you want: "-resize 800x800". By default it will preserve the aspect ratio while shrinking or enlarging until the larger dimension equals the set value.

Last edited by David the H.; 11-28-2009 at 06:15 PM. Reason: altered for correct info
 
Old 11-28-2009, 06:20 PM   #3
beli0135
Member
 
Registered: Jul 2008
Posts: 39

Original Poster
Rep: Reputation: 15
Thank you!

Last edited by beli0135; 11-28-2009 at 06:38 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ImageMagick-Convert, resize width, keep aspect cadj Linux - Software 2 06-18-2010 05:10 PM
a question on packaging....Struck with a dir format, unable to convert it into .pkg!! wrapster Solaris / OpenSolaris 2 06-28-2008 09:23 AM
Best way to Resize Linux partition ? + kernel remove question -=Graz=- Slackware 19 05-25-2008 06:08 PM
question about resize partition while mounting bbmak Linux - Software 3 07-09-2007 05:31 AM
LVM Resize - After logical resize, FS size does not match physical size. spectra Linux - Software 6 11-01-2006 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration