Guidelines

From Techniques for computer generated pictures in complex dynamics
Revision as of 19:44, 25 February 2014 by Arnaud Cheritat (Talk | contribs) (Bitmaps)

Jump to: navigation, search

File format

Bitmaps

As of 2014, I strongly recommend PNG for bitmapped images. It is a lossless compressed format. Pictures with large areas of uniform color compress particularly well. It has been my favorite for nearly 20 years. Back then, to include them in a TeX/LaTeX article there was a tedious conversion to be made from PNG to EPS but now it is recognized by default by pdfLaTeX. Of course I don't know what will be the situation in 20 years (anyway, will this wiki still exist?)

Pros:

  • lossless
  • free and open
  • widely supported by nearly all programs and OS
  • uniform areas compress well
  • can include metadata
  • pdfLaTeX takes it!

Vector

My favorite tool for creating/editing by hand vector images is Inkscape. Use SVG for saving loading editing and inclusion in webpages. Use PDF for exporting towards pdfLaTeX.

I do not have a firm preference for producing vector images of mathematical curves or sufaces. Some free and some commercial mathematical programs can output vector images. I was used to a complicated workflow: write a c/c++ program that outputs a postscript file, (sometimes directly write in postscript), then convert postscript to pdf with any tool for inclusion in pdfLaTeX.

Antialias

Even if you plan to include to produce a small image or include it in a web browser, thus need only low resolution, I recommend to produce a higher resolution picture first, and then downscale it. This is the principle of antialias. A double resolution $2W\times 2H$ already gives a very good improvement. I recommend using integer multiples. Note that for images with uniform color areas, the downscaled PNG will have a size comparable to the original, possibly bigger.

Caution: in some image manipulation programs, you need to convert paletted images to true color before downscaling, or the program may instead of averaging the color use the nearest matching color in the palette, resulting in the absence of antialias.