>> 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.
Hmm, having checked the convert man page, I can see I could do steps 1 & 2 with a single crop, but am still left will the problem of not knowing the image orientation. Maybe sorting in two directories is my only option, eh? _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
