« Paul Graham on creation of wealth | Main | Did The "Wow" Start Yet? »

January 26, 2007

Removing Color Profile from PNGs

A quick way to remove color profile from PNGs in batch. I recently found that removing the color profile from PNGs fixes the problem with images displayed incorrectly (wrong size) when using Cocoa's NSImage initByReferencingFile method.

1. Download pngout for Mac command-line utility:
2. Rename pngout-darwin to pngout and copy it to /usr/local/bin for easy access.
3. Use pngout -k0 filename.png command for a single file or

for i in *; do pngout -k0 $i; done

for the current folder.

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Post a comment

If you have a TypeKey or TypePad account, please Sign In