Skip to content

image guide

Lossless Versus Lossy Images: Pixels, Metadata and Repeated Exports

Lossless describes a relationship between an encoder's input and the decoded result. It does not mean an entire editing workflow preserved the original file, camera metadata, color gamut, animation, or every earlier detail. Understanding that boundary helps you choose a reliable editing master and a compact delivery copy without expecting a format change to repair damage that already happened.

Updated September 24, 2026 · 4 questions answered

Key takeaways

  • Lossless encoding preserves the samples supplied to that encoder; earlier edits can already have changed them.
  • Quality 100 is not a general guarantee of lossless JPEG or WebP encoding.
  • Transparency and losslessness are separate properties: lossy WebP can retain alpha.
  • Keep original files and create final delivery exports from a clean master.

Define What Must Stay the Same

There are several meanings of preservation. Byte-for-byte preservation means keeping the original file unchanged. Pixel preservation means retaining the decoded samples relevant to an agreed color space and bit depth. Visual preservation means the difference is not noticeable for a particular viewing task. Metadata preservation means retaining fields such as capture time, orientation, copyright, or a color profile. These are not interchangeable promises. A PNG export may preserve the pixels supplied to its encoder while discarding the source's metadata. A visually acceptable JPEG can still contain different pixel values when decoded.

For a casual web photograph, visual equivalence may be enough. For scientific measurements, an editable design master, or an archive, the requirements can be stricter. Decide which information matters before choosing the output. If the original is a RAW file, a flattened PNG is not a replacement for its sensor data and editing latitude. If the original is animated, a still PNG does not preserve its timeline. The image format overview explains the broader format families; this guide focuses on what the word lossless actually guarantees.

Understand Quality Sliders and Encoder Modes

Lossy encoders reduce information according to their design and settings. The numeric quality scale is not standardized across JPEG, WebP, different libraries, or different applications. Quality 85 in one exporter is not necessarily visually or numerically equivalent to 85 in another. Maximum quality often reduces the amount of discarded information but does not automatically switch to a lossless mode. Use an explicitly lossless format or encoder setting when exact sample preservation is required, and verify the rest of the pipeline rather than trusting the position of a slider.

PNG encoding is lossless for the pixel data it receives, but resizing, compositing, color conversion, and bit-depth reduction can happen before encoding. WebP supports both lossy and lossless coding. Browser canvas exports with a quality setting should not be described as offering an explicit lossless WebP mode unless the implementation actually exposes and guarantees one. Collabs Tool's PNG to WebP converter offers a quality-controlled browser export, while WebP to PNG provides a PNG output. Choose the latter for a PNG intermediate when that suits the workflow, not as a way to undo prior loss.

Separate Transparency From Compression

An alpha channel describes opacity. Lossless or lossy color coding describes how color samples are represented. WebP can combine lossy color with alpha, so a transparent PNG does not inherently lose transparency just because its WebP output is lossy. JPEG does not provide an alpha channel, so converting a transparent asset to ordinary JPEG requires a background. The Google WebP documentation describes these capabilities. Always check the actual converter and output: a format can support a feature that one particular tool does not preserve.

A white fringe around a cutout is often a compositing issue rather than proof that alpha disappeared. Edge colors may have been blended against a previous matte, and those partially transparent pixels look different on a new background. Inspect the output on black, white, and a contrasting color. The dark-mode asset guide explains how to distinguish a missing alpha channel from contaminated edge colors. Re-encoding the same damaged edge losslessly preserves that damage accurately; it does not reconstruct the clean original mask or the foreground colors behind it.

Prevent Repeated-Export Damage

Every lossy re-encode can introduce another change, especially after resizing, sharpening, or modifying the image. The amount varies; it is not a fixed percentage that can be multiplied across saves. A practical workflow is original capture or design file, then an edited master, then one delivery export for each destination. If several browser tools must be used sequentially, PNG intermediates can avoid additional lossy encodes between operations. Keep those intermediate files separate from the untouched original because the edits themselves still change the image even when the storage format is lossless.

Do not convert a JPEG to PNG merely to claim it has become higher quality. The JPG to PNG guide explains when that conversion is useful: it prevents another lossy storage step during subsequent work and provides an accepted output format. Existing blocks, halos, and missing texture remain. Similarly, converting a tiny compressed thumbnail into a huge PNG only stores the thumbnail's decoded result in a larger file. It cannot recover a detailed product label. Seek the original when the information matters instead of building a chain of increasingly large derivatives.

Evaluate the Actual Output

For ordinary delivery, compare important regions at the final viewing size and at 100%. Look at faces, text, smooth gradients, transparency boundaries, and high-detail texture. Use the image compressor to test a candidate rather than assuming a particular format always wins. A simple icon may already be tiny as PNG, while a complex photograph may benefit greatly from lossy coding. Record both bytes and visual acceptability. A larger file can be worse if it was generated from a damaged source, and a smaller one can be perfectly adequate for its intended display.

For an exactness requirement, use a controlled comparison that accounts for dimensions, color space, bit depth, and decoder behavior. A file hash proves byte identity, not visual similarity; different lossless encodings can have different hashes while decoding to the same samples. Check metadata separately using an appropriate inspector, and do not assume a limited EXIF display exposes every possible field. The color-profile guide explains another common source of apparent mismatch. Preserve the original when uncertain: it is the only reliable reference for revisiting a conversion decision later.

Frequently asked questions

The questions people ask most about lossless vs lossy images: what really changes, answered directly.

Is JPEG quality 100 lossless?

Not as a general rule. A maximum quality setting does not guarantee identical decoded samples. Use an explicit lossless workflow when exactness is required.

Does PNG restore quality lost in a JPEG?

No. PNG can preserve the decoded JPEG pixels without another lossy encode, including the JPEG's existing artifacts.

Can lossy WebP be transparent?

Yes. WebP can retain alpha alongside lossy color coding. Verify that the exporter preserves the feature.

Does lossless conversion preserve metadata?

Not necessarily. Pixel coding and metadata handling are separate. A re-export can drop camera fields or profiles even when the output uses lossless encoding.