The most commonly used digital image format is JPEG (Joint Photographic Experts Group). It allows photographic images to be compressed with little visible loss in image quality when compared to the uncompressed original.
Lossy Compression
Lossy compression reduces the image size by discarding information. It is similar to summarizing a document. For example, you can summarize a 10 page document into a 9 page or 1 page document that represents the original, but you cannot recreate the original exactly from the summary as information was discarded during summarization. JPEG is an image format that is based on lossy compression.
Lossless Compression
With lossless compression, no information is lost in the process. TIFF is an image format that can be compressed in a lossless way.
JPEG allows you to make a trade-off between image file size and image quality.
JPEG compression divides the image in squares of 8x8 pixels which are compressed independently. Initially these squares manifest themselves through artifacts around the edge transitions in an image.
Then, as you increase the compression, the squares themselves will become visible, as shown in the examples below.
100% Quality JPEG It is very hard to distinguish from the uncompressed (TIFF or RAW) original which would typically take up 6 times more storage space.
60% Quality JPEG If you look carefully, you will notice some of the JPEG squares and artifacts around the stone. These artifacts are noticible to the left of the 'J' at the edge of the stone. If you look closely at the top right corner, above the 'G' you'll notice some color noise creeping in.
This quality level is usually sufficient for websites/email.
10% Quality JPEG This image shows serious image degradation with very visible 8x8 JPEG squares. This image makes what JPEG is doing more obvious, the subtle effects seen at higher quality levels are eggagerated here. Hopefully you will never compress an image this aggressively.
For the best quality images, the correct thing to do is to shoot in RAW, after "developing" the RAW file (using a RAW converter like Adobe Camera Raw or Lightroom), export to a TIFF or PSD to do any editing, in Photoshop for example. Once all editing is finished and the image is ready to print, save it as a JPG and set the quality to the best possible and the size to the largest possible and you can't go wrong.
If you're nervous about shooting RAW, shoot "RAW+JPEG" if your camera supports it, until you've learned about RAW workflow.
This way you have the JPEG files you're used to, but, you'll have the full quality RAW images to revisit when you're ready to move to the next level. Space isn't an issue because memory cards continue to increase in capacity as they decrease in price.
These are all settings that can be adjusted in-camera, but they are better adjusted during RAW processing. Set these to their 'zero' values. Also turn off any in-camera sharpening, because you will have much better sharpening tools available in your image editing software, and sharpening should be the LAST step performed after the image editing is complete.
If you're shooting RAW, this is less important because you can reset these values later, but once they're fixed in a JPEG, you're stuck with them.
Sharpening, contrast, saturation and color tone, set these to zero and make any required changes on your computer.
Often we can catch these files before they're printed, but as the photographer, it's your responsibility to submit your images in the correct format.