"John Kopanas" on  wrote...
| Hey guys and gals,
| This is what I am doing now to take an image of any ratio and make a 60x60
| thumbnail out of it.
| 
| > convert -size 240x240 test.jpg -thumbnail x120 -resize '120x<' -resize 50%
| -gravity center -crop 60x60+0+0 +repage test_60x60.jpg
| 
| I was wondering if their was a much simpler way of doing this?
| 
I figured out the above as a method of doing a resize-to-fill
(that is cropping what did not fit the box).

Only an API version that does the calculations needed could do better,
and avoid the double resize in the above.

The ideal way would be to actually build this into the IM core library.
Such a routine can do the calculation needed.  Further it can even
avoid resizing the parts of the image that will be 'cut off', and just
generate the cropped version directly!

However this is NOT currently built into IM core library, but as the
above function has become so 'common' it probably should now be added.

All we need is a C programmer will into do the work.  The code will
essentually be the same as the existing ResizeImage() in the Core
Library, so it isn't like they have to design a a resize function from
scratch!

  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
    The Definition of an Upgrade: Take old bugs out, put new ones in.
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to