personal blog related to technology, coding and publishing.
ImageMagick, GD, SIPS. What’s the tool?
I’m working on an asset management tool that needs to extract data from various image formats. Here’s the formats I need to extract from:
- PSD (Photoshop)
- EPS (Various originations)
- AI (Illustrator)
- JPG
- PCD (Corel maybe?)
- PICT
- PPT (PowerPoint)
- TIFF
The information I need to extract:
- Creation date
- Color mode
- Horizontal resolution
- Vertical resolution
- Width
- Height
- Any embedded description (I imagine EXIF)
- A blob thumbnail to embed in my database from the source asset
I’m at a crossroads as some of the above I can extract with GD or ImageMagick, however neither tool will give me 100% of the data from 100% of the images (in fact, even together I can’t get all I need). Ideally, I would bypass the PHP/Server-Side scripting tools alltogether and bundle a scriptable Mac framework into a RealBasic desktop application. That’s what I’ve been trying out lately, but as I’ve never coded in RealBasic before, and don’t know much about things like Core Image I’m a little lost.
Anyone have any success with a project like this? Thankfully, I have 2.1 million assets that already have this information stored for me, so the above issue will only be for new assets imported (which I have pushed out a delay on any importing for a month).
Update September 03, 2008:
I have upgraded ImageMagick on my server and have succesfully converted several formats, leaving PICT as the only one that’s giving me fits.
- PSD (Photoshop) – Great!
- EPS (Various originations) – Pretty damn good
- AI (Illustrator) – Don’t need to convert at all
- JPG – Great!
- PCD (Corel maybe?) – Great!
- PICT – Very bad results (see below)
- PPT (PowerPoint) – Don’t need to convert (removing from new version)
- TIFF – Great!
Ok, so here’s what’s happening with the PICT files: When I run a basic convert (or mogrify) I’m getting a very small thumbnail version that appears to be inverted. I’ve attached two smaller (GraphicConverter adjusted) previews of the input and output using $ convert Corb_AFP_026.PICT Corb_AFP_026.jpg as the flag.
Input (a smaller version of the original)

See how strange that is? I’m not sure what special flags I need to add to handle the PICT files. It appears that Preview can read the files without error, and GraphicConverter handles them fine as well. However, a simple convert does not, resulting in the output above.
Any suggestions?
Update 2 (same day):
Looks like PCD is now in the mix of piss-poor conversion. I’m having the same output issue as with the PICT files.
| Print article | This entry was posted by Chad Edge on August 18, 2008 at 4:37 pm, and is filed under Apple, code, design, technology, web, work. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
