Cut the sides - or Zooming
Posted: 2010-02-08T04:32:58-07:00
Hi!
(for example)
I have an original image with the dimensions: 6668 x 4992pixels
I want to make an thumbnail with max size of 120x120 (it's not too hard)
The command below performs this (+ little scharp on the outcome)
The thumbnail "Image.png" get the size: 120x90pixels - it's OK!
But I want to Cut a little from the sides so the image becomes slightly larger
Something like this:
(from example: http://www.imagemagick.org/Usage/thumbnails/#cut Fit to given space)
My problem:
I want to remove the area(the background) over and under
the result image (Image2.png) that not belong to the image.
(the size of the result image maybe is 120 x 105pixels)
I want it to function even if the original image is in portrait format
ie. instead cutting a bit up and down on the picture.
//Jan
(for example)
I have an original image with the dimensions: 6668 x 4992pixels
I want to make an thumbnail with max size of 120x120 (it's not too hard)
The command below performs this (+ little scharp on the outcome)
Code: Select all
convert -size 140x140 7748790.jpg -thumbnail 120x120 -sharpen 0x1.0 Image.png
But I want to Cut a little from the sides so the image becomes slightly larger
Something like this:
Code: Select all
convert -define jpeg:size=140x140 7748790.jpg -thumbnail 14400@ -gravity center -background blue -extent 120x120 -sharpen 0x1.0 Image2.png
My problem:
I want to remove the area(the background) over and under
the result image (Image2.png) that not belong to the image.
(the size of the result image maybe is 120 x 105pixels)
I want it to function even if the original image is in portrait format
ie. instead cutting a bit up and down on the picture.
//Jan