> [Site index](https://perfectvector.com/llms.txt) — available pages and descriptions.

# Why the PNG gAMA Chunk Changes Image Brightness

> See how two PNGs with identical pixel data can look lighter or darker, how to check the gAMA chunk, and when an sRGB export can fix the mismatch.

Source: https://perfectvector.com/blog/png-gamma-chunk

Language: en
Author: Irene Kim
Published: 2026-11-25T08:00:00+09:00
Updated: 2026-11-25T08:00:00+09:00

If one copy of a PNG looks lighter or darker, compare how the two files describe their color before editing the artwork. The PNG `gAMA` chunk is optional metadata that describes how stored color samples relate to the intended display intensity. A decoder that uses it can produce different brightness from identical stored RGB values. The [PNG specification's gAMA section](https://www.w3.org/TR/png-3/#11gAMA) defines the tag and how its value is stored.

Check `gAMA` alongside other color metadata. An `sRGB` tag, embedded ICC profile, or `cICP` color signal can take precedence when the decoder understands it. Keep a copy of the original so you can compare the numbers and the appearance after each export.

## Same PNG samples, different decoded gray

We built two 8-bit RGBA PNGs with the same dimensions and byte-for-byte identical `IDAT` payloads. `IDAT` holds the compressed image data. The files used `gAMA` values of 0.45455 and 1.00000, stored as the integers 45455 and 100000. Neither file contained another color tag.

With gamma correction off, the files decoded to identical RGBA bytes. Then we used `png_set_gamma()` in libpng 1.6.59 to apply each file's gamma against the same output gamma of 2.2. The [libpng manual](https://www.libpng.org/pub/png/libpng-manual.txt) shows how to read the file's gamma and pass it to the decoder.

The center swatch stored RGB (128, 128, 128) in both PNGs. With gamma correction on, libpng returned (128, 128, 128) for `gAMA` 0.45455 and (186, 186, 186) for `gAMA` 1.00000. Every alpha sample matched across both files, including a value of 96 in the partially transparent band.

![Two decoded gray swatch panels from PNGs with matching image data, with the middle swatch lighter in the gamma 1.00000 panel](https://perfectvector.com/blog/png-gamma-chunk/workflow-proof.webp)

*Two outputs from libpng 1.6.59 with the same output gamma setting. The upper bands show the decoded grays, and the lower bands composite those grays at the same opacity.*

That result belongs to this decoder and its settings. A viewer using a different color pipeline can produce different numbers, so compare your own files in the app that will actually display them.

## Check gAMA before changing the export

1. **Compare both PNGs in the same app on the same background.** Pick a flat, fully opaque midtone as your first checkpoint. If the shift is only visible along translucent edges, compare those edges on a second background and inspect the alpha channel as well.
2. **Inspect both files' color metadata.** With ImageMagick installed, run the command below. Compare the `png:gAMA` property where present, then look for an `sRGB` chunk or an embedded profile. [ImageMagick's Identify documentation](https://imagemagick.org/identify/) explains the metadata view. A PNG chunk inspector can confirm which tags are actually in the file.
3. **Compare the stored samples if the cause is still unclear.** Use a decoder with color transforms disabled to compare the same pixel in both files. Differing `IDAT` bytes can result from different compression or filtering, so compare decoded samples before concluding that the pixels changed. If samples match and color tags differ, test the files with color management on in the destination.

```bash
magick identify -verbose "before.png" "after.png"
```

## Re-export from a source with known color

If the source has a known color space and the destination expects sRGB, use your editor's color conversion to export a fresh sRGB copy. Convert the colors to sRGB and include the corresponding color information on export. Assigning a different profile without converting tells the next app to interpret the existing RGB numbers differently.

Avoid deleting `gAMA` on sight. The [PNG color chunk priority table](https://www.w3.org/TR/png-3/#color-chunk-precendence) places `gAMA` below other supported color tags. If an embedded profile or `sRGB` is in charge, editing `gAMA` alone may do nothing in that decoder. If `gAMA` is the file's only color tag, stripping it can leave the viewer to make its own assumption.

Open the new export in the destination and compare the same midtone and transparent edge against the reference. If the shift only begins after an SVG export, use the [SVG export color troubleshooting guide](https://perfectvector.com/blog/why-svg-colors-change-after-export) to inspect paint and color conversion there. If you also need paths, the [PNG-to-SVG quality guide](https://perfectvector.com/blog/png-to-svg-without-losing-quality) shows how to judge the traced result.

## FAQ

### Is a gAMA value of 0.45455 the same as an sRGB tag?

No. It is the PNG specification's recommended fallback gamma value for an sRGB file. An `sRGB` chunk explicitly identifies the full sRGB color space.

### Does gAMA change PNG transparency?

Gamma correction applies to the color samples. Alpha represents opacity and stays separate. A translucent edge can still look lighter or darker because its underlying RGB color changed.

### Can removing gAMA fix the brightness shift?

It may change the result in a particular viewer, depending on what other color information is present and what the viewer assumes without the tag. Start from a source with known color, export for the destination, and verify the appearance there.

## Start with the PNG whose color you trust

PerfectVector can turn flat raster artwork into editable SVG paths. Resolve the PNG's color interpretation before tracing so you have a reference for the vector result.

If the job also needs editable artwork, [vectorize your verified source PNG](https://perfectvector.com/image-to-vector) and compare a flat fill in the resulting SVG with the same swatch in the approved PNG. Keep the PNG as the color reference.

## Sources

1. [W3C — Portable Network Graphics specification](https://www.w3.org/TR/png-3/) — Defines image gamma, color chunk precedence, sRGB signaling and the separate alpha channel.
2. [libpng manual — Gamma handling](https://www.libpng.org/pub/png/libpng-manual.txt) — Documents the decode controls used in the controlled comparison.
3. [ImageMagick — Identify](https://imagemagick.org/identify/) — Explains how to inspect individual image properties with verbose output.

## Explore

- [Read the HTML article](https://perfectvector.com/blog/png-gamma-chunk)
- [Indexed PNG vs. RGB PNG: Check Color and Alpha](https://perfectvector.com/blog/indexed-png-vs-rgb-png.md)
- [Read PNG pHYs to Check Print Size and Resolution](https://perfectvector.com/blog/png-phys-print-size.md)
- [Product facts](https://perfectvector.com/product-facts.md)
- [FAQ](https://perfectvector.com/faq.md)
- [Pricing and credits](https://perfectvector.com/pricing.md)
