sipsコマンドは使えるかも




Java Java Image I/O API 使JavaCMYK

Photoshop使

Mac OSX 調


sipsPanther


sipsで出来る事


http://developer.apple.com/jp/technotes/tn2035.html




jpegJfif  XiffGIFPNG







調








200312http://journal.mycom.co.jp/column/osx/073/


画像のプロパティを取得する

取れるだけ取ってくる
sips -g all imageFile

$ sips -g all test.jpg 
/test.jpg
 pixelWidth: 3136
 pixelHeight: 2352
 typeIdentifier: public.jpeg
 format: jpeg
 formatOptions: default
 dpiWidth: 314.000
 dpiHeight: 314.000
 samplesPerPixel: 3
 bitsPerSample: 8
 hasAlpha: no
 space: RGB
 creation: 2006:01:09 11:49:37
 make: OLYMPUS IMAGING CORP. 
model: E-330 
software: Version 1.0 
description: OLYMPUS DIGITAL CAMERA
 








sips -g pixelHeight -g pixelWidth imageFile



$ sips -g pixelHeight -g pixelWidth test.jpg 
/test.jpg
 pixelHeight: 2352
 pixelWidth: 3136
 

-gOK






sips -g propertyName imageFile1 imageFile2...



$ sips -g pixelHeight -g pixelWidth test.jpg test2.jpg 
/test.jpg
 pixelHeight: 2352
 pixelWidth: 3136
/test2.jpg
 pixelHeight: 2304
 pixelWidth: 1736
 

OKJPEG*.jpg


画像のフォーマットを変更する

TIFFに変換する
sips -s format tiff --out outImage imageFile

$ sips -s format tiff --out out.tiff test.jpg 
/test.jpg
 /out.tiff
 

jpegtiffpnggifjp2pictbmpqtifpsd

TIFF


$ sips -g all out.tiff 
/out.tiff
 pixelWidth: 3136
 pixelHeight: 2352
 typeIdentifier: public.tiff
 format: tiff
 formatOptions: default
 dpiWidth: 314.000
 dpiHeight: 314.000
 samplesPerPixel: 3
 bitsPerSample: 8
 hasAlpha: no
 space: RGB
 creation: 2006:01:09 11:49:37
 make: OLYMPUS IMAGING CORP. 
model: E-330 
software: Version 1.0 
description: OLYMPUS DIGITAL CAMERA 



JPEG

sips -s format jpeg -s formatOptions default | [low|normal|high|best|] |packbits --out outImage imageFile



$ sips -s format jpeg -s formatOptions low --out outImage test.jpg 
/test.jpg
 /out.jpg
 

formatOption


$ sips -s format jpeg -s formatOptions 50 --out outImage test.jpg 
/test.jpg
 /out.jpg

画像をリサイズする

幅を300ピクセルにする
sips --resampleWidth 300 --out outImage imageFile

$ sips --resampleWidth 300 --out out.jpg test.jpg 
/test.jpg
 /out.jpg
 

300 --resampleHeight 




300200

sips -resampleHeightWidth height width --out outImage imageFile



$ sips --resampleHeightWidth 300 200 --out out.jpg test.jpg 
/test.jpg
 /out.jpg
 

使




100

sips --resampleHeightWidthMax 100 --out outImage imageFile



$ sips --resampleHeightWidthMax 100 --out out.jpg test.jpg 
/test.jpg
 /out.jpg
 

使DTP100




サーバー用途?


sipsApple*1


使使
使使Quartz2D API