AI Image Detector on HDR Photos: The Gain Map the Detector Never Sees (2026)
Short answer: a modern HDR photo is not one picture, it is an ordinary 8-bit image plus a second, much smaller image that says how much to brighten each area. Apple documents its version as "an 8-bit, single-channel luminance map" stored as auxiliary data at "1/4 the resolution of the original image" (Apple Developer, Applying Apple HDR effect to your photos, checked 18 November 2026). Google's Ultra HDR specifies a gain map in a secondary JPEG that implementers are told to downsample to "1/16 of the size (1/4 on each dimension) of the primary image" (Android Developers, Ultra HDR image format, checked 18 November 2026). Every reader that does not understand the format ignores that second image and shows the flat one — which means the picture a detector analyzes is usually the tone-mapped 8-bit base, while the evidence that a real sensor captured more range than that sits in the layer nobody opened. None of the three pages you are comparing mentions dynamic range, HDR, gain maps, bit depth, or tone mapping at all.
This page is about the newest and least discussed of the two-image files: the one where the second image is not a thumbnail, not a mask, and not a compression artifact, but a brightness multiplier that turns the base into a different photograph.
Every other page on this site has been about damage — what compression, conversion, printing, or re-capture does to evidence that was once in the pixels. This one is the opposite. Here nothing is damaged. The extra information was moved to a second image before the detector ever saw the file, and the base was reshaped by a tone-mapping operator that is not recorded anywhere in the file.
What the three pages you are comparing say about dynamic range
Checked 18 November 2026, reading structure, headings, and whether the page carries any table or number on the subject.
zerogpt.com/ai-image-detector says its tool "supports common formats like JPG, PNG, and WEBP" and that it "scans visual patterns and structures commonly found in AI-generated images, without relying on watermarks or metadata" (third-party reports, checked 18 November 2026). Its use cases cover receipts, IDs, product photos, news images, and avatars. The words HDR, dynamic range, gain map, bit depth, and tone mapping do not appear.
deepai.org/ai-image-detector accepts "JPG, JPEG, PNG, WebP, AVIF, HEIC" (third-party reports, checked 18 November 2026) — so it accepts the two containers that carry gain maps in practice. Its FAQ answers the metadata question with "does not rely on watermarks or metadata which can easily be altered or deleted. Instead, it analyzes the actual pixel-level patterns and structures within images" (third-party reports, checked 18 November 2026). And in the same FAQ there is one sentence that is closer to this subject than anything on the other two pages: "a regular image detector may only analyze format, size or general image properties" (third-party reports, checked 18 November 2026). That sentence is the boundary. Whether a photograph was tone-mapped from a wider range is not format, not size, and not a general image property — it is the difference between two renditions of the same file.
isthisai.com describes its analysis as "A parallel ensemble of models scans for AI fingerprints across pixel patterns, frequency anomalies, and frame timing" (third-party reports, checked 18 November 2026). Frequency anomalies is the phrase that matters here, because tone mapping is a spatial operation and it changes exactly the spatial frequencies a detector would measure — but the page never mentions dynamic range, exposure, highlight recovery, or 10-bit anything.
Put together: three pages that promise pixel-level judgment, and none of them distinguishes a pixel that came off a sensor from a pixel that came out of a tone-mapping curve applied to a wider-range original.
The file contains two photographs, and the visible one is 8-bit
The structure is the part that surprises people who assume "HDR photo" means "a file with more bits per pixel." It does not. In the format Google specifies, the primary image is a conventional JPEG, and the gain map "must be stored as an additional image as defined in CIPA DC-x 007-2009 Multi-Picture Format" (Android Developers, Ultra HDR image format, checked 18 November 2026). The same document states the pixel format of that second image plainly: "The gain map is stored in a secondary image JPEG, and therefore must be encoded using 8-bit, unsigned integer values, thus in the range [0, 255]" (Android Developers, checked 18 November 2026).
So the file is 8 bits, plus 8 bits. There is no high-bit-depth image anywhere in an Ultra HDR JPEG. The range is reconstructed by arithmetic at display time, from an 8-bit base and an 8-bit multiplier field.
The format's own words for what a legacy reader does are unambiguous: "Legacy readers that don't support the new format read and display the conventional low dynamic range image from the image file. Readers that support the format combine the primary image with the gain map and render a high dynamic range image on compatible displays" (Android Developers, checked 18 November 2026). And there is a second path to the same outcome, for files that are slightly wrong: "If invalid metadata is encountered, the gain map should be ignored and the SDR image should be displayed" (Android Developers, checked 18 November 2026).
Count the ways a detector ends up with the flat picture:
- The detector's decoder does not implement gain maps. The spec expects this and calls it backward compatibility.
- The decoder implements them but the metadata fails validation, so the gain map is dropped by rule.
- A server resizes, re-encodes, or strips secondary images on upload — the gain map is a second image inside the file, and anything that rebuilds the file from the primary image alone deletes it silently.
- A screenshot, a messaging app's preview, or a "copy image" in a browser hands over one image, not two.
Apple's arrangement is different in detail and identical in consequence. Its gain map is not a JPEG but an auxiliary image identified by the data type urn:com:apple:photo:2020:aux:hdrgainmap, described as "an 8-bit, single-channel luminance map that's stored with an image," untagged, "encoded using the Rec.709 transfer function and is 1/4 the resolution of the original image" (Apple Developer, Applying Apple HDR effect to your photos, checked 18 November 2026). The auxiliary image is not the picture. It is a side channel that a piece of software has to know to look for.
That is the structural fact to hold onto: in both ecosystems the HDR rendition is optional, computed, and dependent on the reader. A detector is a reader.
The extra range lives in one sixteenth of the pixels
Both vendors converge on the same economy: the multiplier field is stored at a quarter of the linear resolution, which is one sixteenth of the area. Apple states 1/4 of the resolution (Apple Developer, checked 18 November 2026). Google recommends "a 480x270 gain map for a 1920x1080 primary image" (Android Developers, checked 18 November 2026), which is the same quarter-scale ratio.
Run that on a 12-megapixel phone photo, 4032 by 3024:
| Quantity | Value | How it follows |
|---|---|---|
| Base pixels | 12,192,768 | 4032 × 3024 |
| Gain map pixels at quarter scale | 762,048 | 1008 × 756, exactly 1/16 of the base |
| Base pixels per gain sample | 16 | 4 × 4 block |
| Gain map raw size as a fraction of base | 6.25% | 1/16 exactly |
Two consequences follow, and they pull in opposite directions.
The first is that the HDR information is low-frequency by construction. Each stored multiplier covers a 4 by 4 block of base pixels, and both documents require the upsample to be "bilinear or better" (Android Developers, checked 18 November 2026) with Apple's steps calling for the map to be scaled up to the original size before use (Apple Developer, checked 18 November 2026). A bilinear upsample from quarter scale smears one sample's influence across roughly one gain-map cell in each direction, which is about 4 base pixels. So a specular highlight one pixel wide cannot have its own boost value; its brightness is spread over the neighbourhood, and the reconstruction shows a soft halo around small bright features that a physically exposed sensor would not produce. The precise wording matters: the halo is not a defect in the file, it is what a band-limited brightness map looks like when it is resized.
The second consequence is that this is where the "sensor had more range" evidence actually lives, and it is coarse. If a detector were going to reason about highlight recovery — the thing that distinguishes a photo of a bright window from a rendering of a bright window — it would need that information at pixel scale, and the format never stores it at pixel scale. It stores 1 value per 16 pixels and interpolates.
Two formulas, and neither one produces pixels until something renders
The two ecosystems do not even use the same arithmetic, which is worth knowing because it means a "converted" gain map is a re-encode, not a copy.
Google's specification, following the ISO 21496-1 metadata it is designed to be compatible with, defines a logarithmic recovery value per pixel and reconstructs the HDR value like this: the encoded value is divided by 255 to get a recovery fraction, raised to the power one over the gamma, used to interpolate between a minimum and maximum log2 boost, and then applied as HDR = (SDR + offset_sdr) × 2 to the power of (log_boost × weight_factor) − offset_hdr (Android Developers, Ultra HDR image format, checked 18 November 2026). The interpolation happens in log2 space, in stops.
Apple's documented formula for its own gain map is a straight-line multiply: hdr_rgb = sdr_rgb × (1.0 + (headroom − 1.0) × gainmap), where headroom is "the ratio of the luminance of the image's brightest white to the luminance of standard dynamic range (SDR) white" (Apple Developer, checked 18 November 2026). The boost is linear in the stored value, not logarithmic.
Three things follow from reading those two formulas side by side.
First, the weight_factor in the Google formula depends on the display: it is computed from max_display_boost against the file's capacity range (Android Developers, checked 18 November 2026), and the same document notes that max display boost "can change over time based on device settings and other factors, such as ambient light conditions, or how many bright pixels are on the screen" (Android Developers, checked 18 November 2026). Apple's headroom is metadata-derived, from two MakerNote keys read as 32-bit floats and converted to a stop count, with the larger-image branch of that piecewise formula topping out at 3.0 stops when the second key is at zero (Apple Developer, checked 18 November 2026).
Second, Apple's gain map is recorded through the Rec.709 transfer function, which means its 255 levels are not evenly spaced in brightness. Step size has to be computed after inverting the curve, and it varies: for an 8-bit Rec.709-encoded value, one code step equals about 0.79% of the value at the top of the map and about 2.23% at a tenth of the top (calculated here from the Rec.709 transfer function and the 8-bit encoding Apple documents).
Third, and this is the part that matters for a detector: in both systems the HDR image is a function of something outside the file. In one case it is the display's current peak brightness; in the other it is a headroom number derived from two floats in a MakerNote. A detector's input is deterministic the moment it is handed a pixel array, but which pixel array it gets is not determined by the bytes alone.
A tone-mapped base is not a photograph of a scene, it is the output of an operator
This is the argument that changes how you read a score, so it deserves to be stated slowly.
An SDR base image was produced from a wider-range capture by compressing the range. The Android document names the operation directly, defining "range compression" as "also called local tone mapping," whose job is to "avoid clipping highlights or crushing shadows, while preserving local contrast as much as possible" (Android Developers, Ultra HDR image format, checked 18 November 2026). And it sets a requirement that is easy to read past: the format must not change "relative tonal relationships (between objects in the scene)" at any display boost, and must not be applied "via simple linear interpolation," because then "the relative tonal relationships within the image are correct only at max content boost, and are compromised at other boost factors" (Android Developers, checked 18 November 2026).
Read the definition again with detector eyes. Local tone mapping is an operation whose entire purpose is to change local contrast, spatially, differently in different parts of the picture. A detector that measures texture energy, local variance, edge statistics, or high-frequency residual — the kind of measurement the phrase "pixel-level patterns and structures" points at (third-party reports, checked 18 November 2026) — is measuring quantities that this operator has rescaled by an unknown, spatially varying amount.
Three specific things get moved by that operator:
- Highlight shape. A sensor that saturates produces a flat plateau at its full-well level, often with dead-flat noise inside it. Range compression replaces that plateau with a shoulder, and pushes it down to an interior code value. Any detector looking for a clipped plateau at the top of the scale, or for the abrupt noise collapse at a saturation boundary, is looking in the wrong place in an HDR-derived base.
- Shadow lift. The same operator raises shadows to make them visible in SDR, which adds amplitude to exactly the dark, low-signal areas where noise statistics are most diagnostic.
- Edge energy. Local operators boost local contrast around edges to survive the compression. The result is a picture whose edge profile was set by a curve, not by optics.
Now reverse it. Take an AI-generated 8-bit image and wrap it in a gain map — apply an inverse tone curve, store the difference as a multiplier field, write it as a secondary image. The resulting file now has all three of the properties above: a shoulder instead of a plateau, lifted shadows, locally boosted edges. Those are the properties people describe as "looks like it came out of a camera." The wrapper manufactures them without a sensor, and it does it in a layer that most pipelines discard, so the artifact survives as a file property while the detector sees only its effect on the base.
Where the precision is actually lost, and it is not where you expect
It is tempting to assume the 8-bit multiplier field is the weak link. The arithmetic says otherwise, and the conclusion is the most useful number on this page.
Take the example metadata values published in the format document itself: GainMapMin at −0.57609993 and GainMapMax at 4.7090998, which is a range of about 4.71 stops, or a maximum boost of about 26 times the SDR value (Android Developers, Ultra HDR image format, checked 18 November 2026). Spread 255 steps across that range and each step of the multiplier is 0.0185 stops, which is 1.29% in linear brightness (calculated here from the published min and max).
Compare that with the base, where the quantisation is the ordinary 8-bit sRGB step. Measured as a relative change in linear light, one code step at the top of the scale is about 0.90%, at mid-grey about 1.71%, at a quarter of full scale about 3.14%, and at a sixteenth about 8.47% (calculated here from the sRGB transfer function at 8 bits).
| Boost range in the file | Multiplier step, linear | Base step at white | Base step at mid-grey |
|---|---|---|---|
| 2 stops | 0.55% | 0.90% | 1.71% |
| 3 stops | 0.82% | 0.90% | 1.71% |
| 4.71 stops (the published example) | 1.29% | 0.90% | 1.71% |
| 8 stops | 2.20% | 0.90% | 1.71% |
Read the two columns together. The multiplier is finer than the base at every tonal level up to about 3.3 stops of headroom, and even at the published 4.71-stop example it stays finer than the base below about code 175 — roughly 69% of full scale. Only past about 3.3 stops does the boost layer begin to round more coarsely than the base it multiplies, and only in the top quarter of the tone scale.
So the 8-bit gain map is not the bottleneck. The 8-bit tone-mapped base is. The 8-bit tone-mapped base is.
That inverts the usual worry. People assume an HDR file is more precise than an SDR file. In the rendition a detector receives, the opposite is true: the reconstructable range is dense, and the picture the detector got was quantised once, in 8 bits, after a curve had already compressed the top three to five stops into a handful of codes. Whatever tonal fingerprint a detector uses, it is reading the compressed side of the pipeline.
The gain map's own colour profile is thrown away
One small clause in each document carries a large consequence, and it connects directly to the ICC profile page.
Google's Ultra HDR document states: "If present, the gain map's color profile isn't used" and "The color profile of the SDR image defines the color space of the HDR image" (Android Developers, checked 18 November 2026). The same document recommends "Use a Display-P3 color profile" for the base (Android Developers, checked 18 November 2026). Apple describes its gain map as "untagged" (Apple Developer, checked 18 November 2026).
So the colour meaning of the whole HDR file — base and reconstructed highlights alike — is inherited from the 8-bit base image's profile. If the base's profile is missing, the reconstructed HDR rendition has no defined colour space either, only whatever the renderer assumes. This is the same failure mode the ICC page describes, extended to a second image that cannot correct it.
Four ways the verdict goes wrong
None of these are hypotheticals about a specific tool. They are the four combinations that the file structure makes possible, and each one produces a score that is defensible from the pixels and wrong about the picture.
| What you have | What the detector probably receives | How the score misleads |
|---|---|---|
| A real HDR photo, gain map intact, local tone mapping applied | the 8-bit base, with a shoulder where the sensor clipped and lifted shadows | texture and noise statistics now carry the operator's signature; a real photo can read as rendered |
| The same photo after a pipeline dropped the gain map | the same 8-bit base | nothing changes in the score, which is the point: the HDR evidence was never in the input either way |
| An AI image wrapped with a synthesised gain map | the 8-bit base, now with a shoulder, lifted shadows, boosted edges | the wrapper hands the base the statistics of camera processing; a generated image can read as a photograph |
| The same file rendered twice at different display brightness | two different pixel arrays from identical bytes | two scores for one file, and neither one is reproducible on the other machine |
The fourth row is the one people find hardest to accept, so it is worth being precise about what it does and does not claim. It does not claim the detector is unstable. It claims the input is. In the format Google specifies, the reconstruction includes a weight factor derived from the display's available boost (Android Developers, checked 18 November 2026); a phone at low brightness and a monitor at high brightness do not reconstruct the same HDR image from the same bytes. Whatever gets saved or screenshotted from those two renditions is a different image, and a detector asked to score both is not being asked the same question twice.
There is a fifth, subtler failure worth naming because it is the one that produces confident wrong answers rather than ambiguous ones: a photo that was captured in HDR and exported to SDR twice, once with a film-like curve and once with a neutral one. The two exports differ in shadow lift and highlight roll-off, and nothing in either file records which curve was used. A detector's output can move between them while both are, in the ordinary sense, the same photograph.
A four-file test on one photo
The protocol below needs one HDR photo from a phone, a computer, and a tool that reports whether auxiliary images are present. It does not require any special software beyond a metadata reader. Since formats differ, the test is built around Ultra HDR JPEGs, where the structure is documented and the gain map is a separate JPEG that can be found and removed.
Step 1. Confirm the file has a gain map. Read the primary image's XMP and look for hdrgm:Version, which the format document names as the signal: "A JPEG file conforming to this format may be identified by the presence of hdrgm:Version="1.0" in the primary image's XMP packet" (Android Developers, Ultra HDR image format, checked 18 November 2026). In ExifTool, listing all tags with group names and then searching for hdrgm and for a second embedded JPEG is enough; if you find neither, you do not have an Ultra HDR file and this test does not apply.
Step 2. Build four files that differ only in the layer.
- A: the original, gain map intact.
- B: the base image re-saved with the gain map removed, everything else untouched (same pixels, no re-encode if you can avoid it).
- C: the original with the multiplier field forced to its minimum everywhere, so the reconstruction equals the base by construction, but the container is still a two-image file.
- D: a plain JPEG re-encoded from the base at high quality, with no gain map and no XMP.
Step 3. Score all four. In a well-behaved pipeline A and C will often agree, because both reconstruct to the base; if A and C disagree, your decoder is applying something you did not expect. B and D test whether the presence of the second image, rather than its content, changes anything.
Step 4. Read the pattern, not the numbers. Four identical scores mean the tool is reading only primary-image pixels, which is the documented behaviour of a legacy reader and is not a defect. A score that moves between A and C means the tool's input path is applying the gain map, and then the question becomes which display headroom it assumed. A score that moves between B and D, where the pixels are meant to be the same, means the tool is sensitive to file size or container details rather than to the picture — the same confound the EXIF page addresses with a padding segment.
Step 5. Repeat the whole thing once with the phone at minimum screen brightness and once at maximum, if you score on-device. If the scores differ, you have demonstrated the display dependency in one afternoon.
What this test cannot do is tell you whether the photo is AI-generated. It tells you which layer your tool is reading, and that is the prerequisite for believing anything else it says.
How to read the score afterwards
| What you observed | What it supports | What it does not support |
|---|---|---|
| Gain map present, base scores as AI | the base's tonal curve resembles rendered output | that the photo is generated — the curve may be the phone's |
| Gain map present, base scores as camera | the base has camera-like processing | that the file's HDR data is genuine; a wrapper produces the same statistics |
| Gain map absent, base scores as camera | nothing about HDR either way | that the file was always SDR, or that it was never re-encoded |
| Same file, two scores at two brightnesses | the input was reconstructed, not read | that either score is more correct |
What this changes about the three tools
Nothing about their marketing, and something about how you compare them. All three accept JPEG and at least two accept HEIC and AVIF, which are the containers where gain maps actually appear (third-party reports, checked 18 November 2026). None of them says whether it applies gain maps, whether it validates the metadata, or what display headroom it assumes. That is not a scandal; it is a specification gap that no consumer detector has closed, and it means the honest comparison between them on HDR material is not "which number is higher" but "which one tells you what it did with the second image."
If you have to choose a single behaviour to look for, look for this: a tool that reports the number of images in the file, or the presence of auxiliary data, before it reports a score. That single line tells you whether the pixel evidence it used was the flat rendition or the reconstructed one. The percentage page explains why the number alone cannot tell you.
The short version
An HDR phone photo is an 8-bit picture plus a quarter-scale, 8-bit brightness map that most software ignores. The detector reads the 8-bit picture. That picture has already been through a local tone-mapping operator that reshaped highlights, shadows, and edge contrast — the three things a texture-based detector is most likely to measure — and the operator's settings are not in the file. Meanwhile the only evidence that a sensor captured a wider range sits in a layer the detector never opened, and that layer is coarse enough that it could not express a one-pixel specular highlight anyway.
The practical consequence is narrow and useful: on HDR material, a score tells you how much the visible rendition resembles the detector's idea of a camera, and nothing about whether a camera was there. If you need the second thing, check for the gain map first, then use the false-positive procedure rather than arguing with a percentage.