Sub topic 4
Raster Formats at a Glance: Lossy vs. Lossless, Layers vs. Flat
This chapter assumes you understand pixels, image dimensions, and the basic purpose of Photoshop layers. It focuses on how PSD, JPEG, and PNG store raster images and what each format preserves or discards.
Raster images and compression
A raster image stores color information in a grid of pixels. A 1920 × 1080 image contains 1920 pixels across and 1080 pixels down. Photoshop can edit those pixels, but the file format determines what else remains available.
Compression reduces file size. Lossy compression removes some image information permanently. Lossless compression reduces file size without changing the stored pixel values.
JPEG uses lossy compression. It is effective for photographs because small color changes are often difficult to notice. At low quality settings, JPEG can create blocky edges, blurry details, halos, and speckled areas. Reopening and resaving a JPEG can apply additional losses.
PNG uses lossless compression. It keeps pixel values unchanged during saving and reopening. PNG files can also store an alpha channel, which records how transparent each pixel is. This makes PNG useful for logos, interface graphics, and other images with sharp edges or transparency.
PSD is Photoshop's native working format. It can preserve layers, masks, adjustment layers, smart objects, and other editing information. PSD compression does not turn the document into a simple, flat image.
Layered versus flat files
A layered document stores separate visual components. For example, a banner might contain a background layer, a photograph layer, and a text layer. You can hide, move, or edit each component independently.
A flat file stores the visible result as one image. JPEG is flat. PNG is normally flat when Photoshop creates it, even though PNG can preserve transparency. Saving a layered Photoshop document as JPEG or PNG removes the separate layer structure from that output.
Flattening combines visible layers into one composite image. Once you close the document after flattening and save over the original, you cannot recover the original layer arrangement unless you have a backup.
| Format | Compression | Layers preserved | Transparency | Best common use |
|---|---|---|---|---|
| PSD | Lossless or near-lossless working storage | Yes | Yes | Editable master document |
| JPEG | Lossy | No | No | Photographs and small web images |
| PNG | Lossless | No in normal Photoshop output | Yes | Logos, graphics, and transparent images |
A practical format workflow
Use PSD while work is still changing. Use JPEG when a compact, flattened photograph is more important than perfect pixel preservation. Use PNG when crisp edges or transparency matter.
A lossless PNG does not restore detail already removed by a JPEG. Choose the format before exporting, and keep the original PSD available for future changes.
Exercise
You are delivering a logo with transparent space around its edges. Which format should you use, and why?
Show answer
Use PNG because it preserves the pixel data without lossy compression and can store transparency. Keep the layered source as a PSD if you may need to edit the logo later.