VisezTrance

  • February 6, 2009 11:11 AM

    Fixing the png color mismatch on mac os x

    By Daniel
    When it comes down to work, most of the times I get my graphics from a talented designer that worked on a mac. If the files happen to be in the PNG image format things get slightly confusing. Mac OS X will render the images using the color profile they got stored, actually png gamma correction would be more exact. This is not immediately apparent because at a glance the files may look identical but using the pngs over a CSS background color often reveals an unpleasant sight on the mac, especially on Safari.
    To prevent such a color mismatch either use a different image format or strip the png gamma correction. In the case of the latter, pngcrush does a pretty good job.
    I was pleasantly surprised that I could install it with ease on Fedora ("yum install -y pngcrush"). To use it run:

    pngcrush -rem gAMA -rem cHRM -rem iCCP -rem sRGB <png-file-name> \ <optimized-png-file-name>

    Removing that unnecessary meta data will also save you a few KBs, which is quite useful regardless if you have any problems with pngs or not.

    Tags:

    • mac os x,
    • png
  • Monthly Archives

    • October 2013 (2)
    • May 2012 (1)
    • October 2011 (1)
    • September 2011 (2)
    • March 2011 (3)
    • February 2011 (1)
    • January 2011 (1)
    • September 2010 (1)
    • August 2010 (1)
    • June 2010 (1)
    • April 2010 (1)
    • December 2009 (1)
    • October 2009 (1)
    • September 2009 (1)
    • August 2009 (1)
    • July 2009 (2)
    • April 2009 (2)
    • February 2009 (1)
    • January 2009 (2)
    • December 2008 (1)
    • October 2008 (1)
  • Pages

    • About / Contact

2008, © Daniel Mircea