cropping with sips

Discussion in 'Mac' started by Lao Ming, Nov 12, 2009.

  1. Lao Ming

    Lao Ming Guest

    sips says it can crop but it doesn't. Well, not in any controllable
    fashion. I want to crop off only the bottom of a limitless set of
    images and all sips cropping is center-based.

    sips --cropToHeightWidth 768 1024 1024x1024l.png -o 1024x768.png

    I get what I ask for except that, uh, it crops both the top and bottom
    of the image and there appears no way to tell it to crop only the

    All other possible methods are simply scaling.

    sips --resampleHeight 768 1024x1024.png -o 1024x768.png

    sips --resampleHeight 768 --resampleWidth 1024 1024x1024.png -o

    sips -Z 768 1024x1024.png -o 1024x768.png

    All three of the above commands result in a 768x768 image. Nothing is
    cropped as expected.

    Without having to resort to ImageMagick (don't want to have to compile
    it on every Mac), is there any Apple shell program or perl script or
    php script or python script or anything similar that will do this?

    Thanks for any help.
    Lao Ming, Nov 12, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.