Do not use JPEGs for anything but photographs. They use lossy compression and make histograms, graphs and line drawings look terrible.
Essentially any other format is fine. I recommend PNG, which offers very good lossless compression and is supported by all modern programs. There is no advantage to using JPEG over PNG in a modern environment (except for photographs). JPEGs seem to be used simply because people are more familiar with the name.
JPEGs are so poorly suited to line drawings that their file sizes are actually larger even though they are throwing away information! To illustrate:
An 11 kB PNG![]() |
An 11 kB JPEG![]() |
To illustrate further, if you crank the JPEG quality way up, you get this 45 kB file. This one (at 4x the size), looks acceptable at a glance on most screens, but will not if you zoom in or print it.