What JPEG Throws Away (And Why PNG Can't Give It Back)

ToolHQ TeamJuly 27, 20267 min read

In the summer of 2019, a photojournalist was preparing to submit images to a magazine editor who required PNG files. He had spent the afternoon shooting in JPEG at 60% quality to save storage space on his memory cards. Converting everything to PNG before submitting took a few minutes. Each file grew from roughly 800KB to over 4MB. When the editor opened the images, they looked exactly the same as the originals.

That outcome is the central misunderstanding about converting JPEG to PNG: the PNG format is lossless, which leads people to assume the conversion will restore what was lost. It does not. PNG can only preserve whatever data the file still contains. By the time you open a JPEG to convert it, the information that was discarded during the original compression is gone permanently. It exists nowhere in the file, and no format change can recover it.

To understand why, you need to look at what JPEG actually discards when it compresses an image, and why that discard is mathematical and final.

How JPEG Gets Its Small File Sizes

JPEG was standardized in September 1992 as ITU-T Recommendation T.81, developed by the Joint Photographic Experts Group, which had been working on the problem since the late 1980s. The engineering challenge was genuine: uncompressed digital photographs produce enormous raw data files, and the storage and network bandwidth of the early 1990s made that unworkable for practical use. The format that the group developed achieves compression ratios between 10:1 and 40:1. A file that would otherwise occupy 40MB could compress to 1MB with only subtle visual degradation at moderate quality settings.

The mechanism is a Discrete Cosine Transform, or DCT. When you save a JPEG, the encoder first converts the image from RGB color space to a format called Y'CbCr, which separates the brightness (luminance) information from the color (chroma) information. Human vision is significantly more sensitive to brightness variation than to color variation, so the encoder immediately downsamples the chroma channels, storing color information at lower resolution than brightness information. This alone discards real data, though it is usually invisible at normal viewing distances.

The image is then divided into 8-by-8 pixel blocks. Each block is converted from a grid of pixel values into a map of frequency components using the DCT. Low-frequency components represent slow, gradual changes across the block: a clear blue sky, a smoothly lit skin tone. High-frequency components represent rapid changes: the edge of a leaf against the sky, text on a page, the individual strands of someone's hair. This frequency representation does not by itself compress anything. The compression comes in the next step, and that is where information is permanently destroyed.

The Point of No Return: Quantization

After the DCT converts each 8-by-8 block into frequency components, the encoder applies quantization. Each frequency value is divided by a number from a quantization table, with different numbers for different frequencies, and the result is rounded to the nearest integer. High-frequency components are divided by larger numbers, which means they round to zero or to coarse approximations of their original values. Low-frequency components are divided by smaller numbers and survive with less distortion.

This rounding step is the actual compression. It is also irreversible. The JPEG specification itself acknowledges this: even if the quantization table divides every value by one, the absolute minimum, information is still lost in the rounding step, because the original DCT coefficients are floating-point numbers and they become integers. You cannot mathematically recover a number's decimal portion after it has been rounded away. The precision is gone.

The visible results of aggressive quantization are what photographers call JPEG artifacts. Because blocks are processed independently, the 8-by-8 block boundaries can become visible as a blocky banding pattern, particularly in areas of smooth gradation. Fine textures like hair, grass, and fabric blur and smear. Colors bleed across sharp edges because of the chroma downsampling applied earlier. Near high-contrast edges, a halo of alternating light and dark bands can appear, called ringing, because the reconstruction overshoots the lost high-frequency coefficients.

Every re-save of a JPEG compounds this damage. Opening a JPEG, making any edit, and saving again runs the quantization process a second time on data that has already been rounded once. Two saves at 70% quality produce worse results than a single save at 50%. This is why photographers working in post-production work in RAW or TIFF formats and convert to JPEG only at the final export step: not because they are being precious about file formats, but because re-quantization genuinely destroys detail.

What PNG Actually Does — and Does Not Do

PNG was released on October 1, 1996, and its origins have nothing to do with quality restoration or improvements over JPEG. The format was created in direct response to a patent dispute. On December 28, 1994, Unisys announced it would enforce royalty payments for software implementations of GIF, because GIF used its patented Lempel-Ziv-Welch compression algorithm. On January 4, 1995, a developer named Thomas Boutell posted a proposal on Usenet calling for a free, patent-unencumbered alternative. Oliver Fromme, creator of the JPEG viewer QPEG, suggested the name PNG as a recursive acronym: PING is not GIF. The PNG Development Group coordinated the format's development over the following year, releasing the final specification in October 1996.

PNG uses a two-stage lossless compression process. First, it applies prediction filters to each row of pixels, estimating each pixel's value based on its neighbors and storing only the difference between the prediction and the actual value. Then it applies DEFLATE compression, the same algorithm used in zip files, which is entirely lossless. Every byte in the original data can be reconstructed exactly. No information is discarded.

Lossless means PNG faithfully preserves whatever data it receives. If you convert a JPEG to PNG, PNG stores every pixel value from the JPEG file, including all the artifacts and degradation produced by quantization. The output file will be larger, because PNG is less efficient than JPEG at compressing photographic images with smooth gradients. But the visual content is identical to the source JPEG. Nothing has been enhanced or repaired. PNG has created a larger, lossless copy of already-degraded data.

There is one thing PNG can do that JPEG fundamentally cannot: support an alpha channel for transparency. JPEG was designed exclusively for opaque photographs and has no mechanism for representing transparent or partially transparent pixels. PNG supports full alpha-channel transparency, including partial transparency at any opacity level. This is the actual technical reason to convert a JPEG to PNG for web or design work: not to improve quality, but to gain the ability to have a transparent background that the JPEG format does not allow.

When Converting Actually Makes Sense

The decision to convert a JPEG to PNG depends on what you need the file to do, not on which format sounds higher quality. For photographs that will be displayed as photographs on a website, in a document, or printed, staying in JPEG is almost always correct. The format was designed for continuous-tone photographic images with smooth gradients, and its compression is highly efficient for that content. A JPEG photograph stored at high quality will be substantially smaller than the PNG equivalent with no perceptible visual difference.

Converting to PNG makes sense in three specific situations. When the image needs a transparent background: since JPEG cannot represent transparency at all, PNG is the necessary format for product images with cutout backgrounds, logos, interface elements, or any image that needs to float over a varying background. When the image will be edited and re-saved multiple times: PNG's lossless nature means each save cycle produces an exact copy, while each JPEG re-save compounds the quantization loss. And when the image contains text, sharp line art, or large areas of solid color: PNG's lossless compression prevents the blurring and ringing artifacts that JPEG produces around hard edges, and PNG often produces smaller files than JPEG for graphic content because JPEG's frequency-domain approach is poorly matched to sharp transitions.

What the conversion does not do is improve a photograph that was already saved as JPEG. The photographic quality was determined at the moment of the original JPEG save. The quantization table used and the quality setting chosen at that moment determined what frequency information was rounded away and what was preserved. No subsequent format change touches that outcome.

Conclusion

The JPEG format has compressed billions of photographs since 1992 through a process that is genuinely well-engineered for its purpose. The DCT-and-quantization approach mimics how human vision weights different frequencies, discarding the high-frequency detail that the eye is least sensitive to. The tradeoff is that this discard is permanent, and every downstream decision about the file happens in the context of that original compression.

The right time to think about PNG versus JPEG is before the first save: when you know whether the image will need transparency, whether it will go through multiple edit cycles, and whether it contains the kind of sharp graphic content that PNG handles better. For images already in JPEG, converting to PNG is worth doing when you need transparency or plan further editing. ToolHQ's JPG-to-PNG converter handles the conversion cleanly and without installing software. But it is worth understanding what the conversion does: it copies the image faithfully, preserving exactly what the JPEG contained, including what the original compression removed.

Frequently Asked Questions

Does converting a JPEG to PNG improve image quality?

No. PNG preserves whatever data the JPEG file contains, including all compression artifacts. Converting cannot restore information that was discarded when the image was originally saved as JPEG.

Why is my PNG file larger than the original JPEG?

JPEG uses lossy compression highly efficient for photographs. PNG uses lossless compression, which stores all pixel data and typically produces files 3 to 5 times larger than equivalent JPEGs for photographic content.

When should I actually use PNG instead of JPEG?

Use PNG when you need a transparent background, when you plan to re-edit and re-save the file multiple times, or when the image contains sharp text, logos, or solid-color graphics rather than photographs.

What happens if I save a JPEG file multiple times?

Each save runs the quantization process again on already-rounded data, compounding artifact damage. Two saves at 70% quality produce worse results than a single save at a lower setting.

What is an alpha channel and why does it matter?

An alpha channel stores per-pixel transparency information. PNG supports full and partial transparency through alpha. JPEG has no transparency support at all, making PNG the required format for images with transparent backgrounds.

Try These Free Tools