[magick-users] Convert APS scans to 800x600

Ralph B ralph.magick-users at spampot.com
Thu Oct 23 08:08:18 PDT 2008


> You might find the -trim and -fuzz options useful to remove all the white
> trim around the image which will do your steps 1 and 2 together: e.g.
> convert input.jpg -fuzz 5% -trim +repage output.jpg
> The trim operation leaves behind a "virtual canvas" which is removed by
> the +repage.

Thanks for the hint. I think that should help with my step 1 but not my
step 2.

I'll try some ASCII art to explain:
|---------------------------|
| |--!-----------------!--| |
| |  !                 !  | |
| |  !                 !  | |
| |  !                 !  | |
| |  !                 !  | |
| |--!-----------------!--| |
|---------------------------|
The outer frame is my start state.
Step 1 is to remove the outer (white) margin.
Step 2 is to crop the remaining wide-format (16:9?) frame to 4:3 (that's
the "!" cut lines)
Step 3 is to resize to max 600 pixel height.

Your hint should handle my step 1 fine (except, I guess, I won't be able
to predict the output image size of this step).

However I still have my landscape/portrait problem when it comes to do the
crop in step 2. I can't just crop the left and right margins again, since
I don't know the orientation.


More information about the Magick-users mailing list