Crop -- resize camera pics?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jessejazza2
Posts: 2
Joined: 2016-07-17T00:16:54-07:00
Authentication code: 1151

Crop -- resize camera pics?

Post by jessejazza2 »

I'd be grateful for some advice on resizing camera pics.

So far each camera I have used takes pics in 4:3 ratio. That's been fine as mogrify 50% has given me 800x600 which is ideal for forums, emails etc.

My new android phone seems to do 4128x2322 while the tablet conveniently stays with 4:3. So I want to presumably crop to 4:3 ratio but not sure how to set IM to do it. Resizing alters the aspect ratio which I don't want.

thanks (probably quite simple and I'm just dim!)
vonbiber
Posts: 13
Joined: 2009-08-18T07:55:47-07:00
Authentication code: 8675309

Re: Crop -- resize camera pics?

Post by vonbiber »

I would do this

Code: Select all

convert input_image -auto-orient -thumbnail '800x600>' output_image
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Crop -- resize camera pics?

Post by GeeMack »

jessejazza2 wrote:My new android phone seems to do 4128x2322 while the tablet conveniently stays with 4:3. So I want to presumably crop to 4:3 ratio but not sure how to set IM to do it. Resizing alters the aspect ratio which I don't want.
First I'd check to see if your phone has a setting to take the photos in a 4:3 format. The 4128x2322 image is a 16:9 ratio commonly used for HD video, and the phone surely should let you change that to a 4:3 photo aspect (and maybe a 3:2 aspect, too). But whatever the dimensions of your original, ImageMagick can easily modify your photo sizes a few different ways.

You can force a resize to any particular dimensions, but the result of simply changing a 16:9 aspect ratio to a 4:3 ratio would be quite distorted.

You could crop some amount off the left and right sides of the original to make it 4:3, then do your resizing. That would preserve the entire height but remove some of the width from the original.

Or you could add a black (or any color) top and bottom border to pad the image up to 4:3. That would preserve the entire image, but add a pretty substantial strip of color to both horizontal edges.

The exact methods would require you to provide the version of ImageMagick you're using and which operating system you're working on.
jessejazza2
Posts: 2
Joined: 2016-07-17T00:16:54-07:00
Authentication code: 1151

Re: Crop -- resize camera pics?

Post by jessejazza2 »

Oh first reply did not seem to work.

Many thanks - yes there is a setting for 4:3 on the phone. Apologies I didn't notice... the tablet only does 1600x800 and so I assumed one couldn't change it.
Post Reply