$Id: image.txt 1869 2008-06-01 19:29:34Z mjs $ ## FAQ: Why do the colours of the PNG file not match CSS colours? This is probably caused by some embedded colour space information; see below for how to remove this. ## HOWTO: Remove color space information from PNG files (pngcrush) (You might want to do this to ensure that PNG colours match CSS colours.) $ pngcrush -rem gAMA -rem cHRM -rem iCCP -rem sRGB infile.png outfile.png See http://hsivonen.iki.fi/png-gamma/ (Or, convert to GIF...) ## HOWTO: (Losslessly) compress PNGs (pngcrush) $ pngcrush image.png -rem alla -reduce result.png See http://developer.yahoo.net/blog/archives/2008/03/yahoos_latest_p.html ## TIP: ImageMagick tips See http://www.cit.gu.edu.au/~anthony/graphics/imagick/ ## HOWTO: Convert string to image using TrueType font (ImageMagick) Text on command line: $ convert -background white -fill black -font ~/Library/Fonts/P22UNDER.TTF \ -transparent white -pointsize 72 label:"Holloway Rd" holloway.gif Text in file: $ convert -background white -fill black -font ~/Library/Fonts/P22UNDER.TTF \ -transparent white -pointsize 72 label:@holloway.txt holloway.gif (This does do anti-aliasing, but I couldn't get a separate "matte" colour working...) HOWTO: Crop an image (ImageMagick) $ convert -mattecolor black src.jpg -crop 70x70+0+0 -size 70x70 +repage dst.jpg ImageMagick 6+ use the "new" command-line parameter handling--the hard bit is to make sure the different bits are specified in the right order! ## HOWTO: Mark a particular color as "transparent" (Known as "Color to Alpha" in gimp.) Use imagemagick: $ convert -transparent white foo.png bar.png (I don't know how to do this with Pixelmator.) HOWTO: Strip comments from JPEGs (jpegtran) $ jpegtran -copy none -optimize -perfect src.jpg dst.jpg See http://developer.yahoo.net/blog/archives/2008/03/yahoos_latest_p.html