Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: Reading PICT Images



Joshua Marinacci wrote:

Adrian Sutton wrote:

.... We're a signed
applet so installing ImageMagick wouldn't be good but if there was something
available as part of OS X I could certainly run it. Do you happen to know if
there's something like that as part of the standard install?

I don't believe it is, though you could make Preview.app do it using applescript.

There is a tool in the standard OS install: it's called /usr/bin/sips.

The name stands for Scriptable Image Processing System. It can do many kinds of conversion, resizing, cropping, metadata, and other operations. Basically, it's the innards of Automator.app's image- processing features and the Image Events scripting suite.

Read 'man sips' for details on what it can do, or type 'sips -h' for a summary.

Someone already posted an example of converting an image file from PICT to PNG, but it has enough other features that sips is worth considering in a wider range of image-processing tasks. It exists on 10.5 and 10.4 for sure, and maybe even 10.3 IIRC.


However, if you can find a viable ImageIO plugin I'd use that before going the exec() route.

It depends. If the file-format conversion is a fundamental feature of the overall task, then exec()'ing the sips command is not that different from schlepping the file in through one ImageIO converter and out through another. Also, for an applet, the total code size might be important, and exec()'ing sips could be smaller than sending ImageIO conversion classes in the applet's jar.


  -- GG

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.