On Thu, 18 Mar 2010 23:06:48 +0100 [email protected] wrote:
| Deal all, | | I would like to create a Face image to insert in my mail message, the | first step is to resize my image to 48x48 pixels. | My starting image is this: | http://i250.photobucket.com/albums/gg274/gialloporpora/foxkeh2.png | | of 4400 bytes | I need to transform it in an image of at most 725 bytes: | http://quimby.gnus.org/circus/face/ | | If I resize it using ImageMagik I obtain an image, 48x48, of 2200 bytes | that is too big. | | Somebody know some idea to reduce the size of the file? | If possible, I would like to use only two colors (monochrome but not | black and white). | | Thanks | Sandro Mail faces (X-Face: header, such as the odd looking one you have in your original e-mail) are bitmap images. Generally they are created by generating a 48x48 bitmap image of raw hexadecimal, whcih is feed into the 'compface' program to convert it into a compresses ascii string. Alternative later version take a X-Bitmap from which it extracts the bitmap. IM can generate that 48x48. At no point is PNG used for this as PNG is a color image format. ---- The pointer however shows the newer 'Face:' format. and the size limits have some specific needs. FIRST remove any transparency. Second use the highest compression possible -quality 93 is a good suggestion. Note the '9' is the compression the '3' is an encoding format, you can also try '1' '2' or '5' to see if you get a smaller image. Alternatively use "pngcrush" to have it try all the encoding types to get the smallest image format. You can also try "optipng" can convert it to a 8-bit index image to see if that is smaller. If this all fails then it is time to do color reductions try adding a -colors 64 to the convert line. and then repeats the above. Reducing colors is called 'Color Quantization' and is looked at in http://www.imagemagick.org/Usage/quantize/ these last few steps "optipng" and "quantization" however will change and degrade your image to attempt to make it smaller. The given page has in it "ppmquant 7" whcih is actually equivalent to a "-colors 7" a EXTREME reduction in When you work out the steps -- script it and share!!! Such a script would start with the given 48x48 image, and slowly degrade it worse and worst, using may PNG sub-format attempts, until the 725 PNG file size is reached. BTW: the base64 encoding format does not care about spaces. You can add line breaks anywhere within the encoded string. Mail header format however requires at least a single space or tab at the start of continuing header lines. Anthony Thyssen ( System Programmer ) <[email protected]> -------------------------------------------------------------------------- God, that was a realistic 'experience'. The R&D boys were incredible. And quite mad. --- Larry Niven and Steven Barnes, "Dream Park" -------------------------------------------------------------------------- Anthony's Castle http://www.cit.griffith.edu.au/~anthony/ _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
