Skip to content

Highlight recovery produces pink/magenta highlights in iPhone 15 Pro Max RAW photos #548

Open

Description

@codic12

Description

When editing photos taken on an iPhone 15 Pro Max, reducing overexposed highlights causes the affected areas to turn pink/magenta instead of recovering to a neutral white or their original color.

This is particularly noticeable in bright, nearly clipped areas of an image. Other RAW processors, including Lightroom, handle the same photos without introducing this strong pink tint.

Steps to Reproduce

  1. Open a RAW photo taken on an iPhone 15 Pro Max that contains overexposed highlights.
  2. Reduce the Highlights slider to recover detail in bright areas.
  3. Observe the color of the recovered highlights.

Expected Behavior

Recovered highlights should retain natural colors or appear neutral white when detail cannot be recovered, as they do in Lightroom and other RAW processors.

Actual Behavior

The recovered highlights become noticeably pink/magenta, making highlight recovery largely unusable for affected photos.

Additional Information

  • Device: iPhone 15 Pro Max
  • Comparison: Lightroom and other RAW processors
  • Possible cause: An issue with highlight reconstruction, white balance, or handling clipped color channels in the RAW processing pipeline.

This appears to be a color reconstruction issue rather than simply an overly aggressive highlight adjustment.

Activity

  1. radialmonster commented on Oct 9, 2026

    @radialmonster
    Contributor

    Could you share one of these iPhone 15 Pro Max raws? The only public iPhone ProRAW sample we test with (an iPhone 12 Pro on raw.pixls.us, id 4264) has almost no clipped highlights, and pulling Highlights to −100 on it stays neutral. So it can't show this. A file with a blown sky or a lamp would let us see where the pink comes from. Uploading it to raw.pixls.us under CC0 (ideally without people) helps everyone, or attach it here if you're happy for it to be used for testing.

    It would also help to know whether the photo was taken as ProRAW (Settings → Camera → Formats → Apple ProRAW) or with a third-party camera app's "Bayer RAW" mode, since the two store very different data.

  2. codic12 commented on Oct 9, 2026

    @codic12
    Author

    I believe it was a bayer RAW. I've uploaded to raw.pixls.us, and here as well because I can't attach a DNG:
    https://drive.google.com/file/d/1vYZ2fAz445EZsUC0gw1TskyBiExoyier/view?usp=sharing

    Image

    Here is a sample of how it looks in LightCraft.

  3. radialmonster commented on Oct 9, 2026

    @radialmonster
    Contributor

    Thanks, that file reproduces it on current main. With Highlights at −100 the sunlit white wall of the house turns bright magenta, and parts of the sky go pink and cyan; a small pink patch in the sky shows even at default settings (left: default, right: Highlights −100).

    iPhone 15 Pro Max DNG on current main: default and Highlights -100

    I'm looking into where it comes from. Clipped highlights that aren't recognised as clipped, and then get tinted by white balance, are the usual cause of exactly this look. I'll post what I find.

  4. radialmonster commented on Oct 9, 2026

    @radialmonster
    Contributor

    Thanks for the file, it shows the cause. Your DNG states a white level of 4095, but the sensor data actually stops at 3567 (about 85% of the range), in all three colours. LightCraft only treats samples at the stated white level as clipped, so the blown sky and the sunlit wall were not recognised as clipped, and white balance (red x2.46, blue x1.59) turned them magenta, much more so with Highlights at -100.

    #586 fixes the magenta: when the samples pile up at a value clearly below the stated white level, they are now treated as clipped. On your frame the pink sky patch and the magenta wall and pole are gone. One thing remains: with Highlights at -100 a bright cloud on the right is still slightly cyan, which is a separate limitation of how partly clipped areas are rebuilt.

  5. radialmonster commented on Oct 9, 2026

    @radialmonster
    Contributor

    Follow-up to #586: #602 fixes the two remaining problems in partly clipped highlights.

    • Cyan cloud with Highlights at −100. In your frame, green and blue are clipped across most of the bright cloud, so its colour is rebuilt from the pixels around it. The dark power lines crossing it, and the pixels right next to the clipped area (which demosaicing builds partly from clipped samples), were pulling that colour toward cyan. Now the colour comes from the bright unclipped pixels, and pixels with more clipped channels are drawn toward neutral. The cloud comes out near-white instead (mean of the patch 159/188/187 → 172/179/182). The green dots along the wires are gone too.
    • Green speckles in small previews. At 500 px, one clipped specular sample used to push a whole 8 × 8 block's green to the clip level. Clipping is now decided per sample, before averaging.

    Photos without clipped highlights render exactly as before (checked byte-for-byte on 300 public files). Before/after crops are in the PR.

  6. radialmonster commented on Oct 22, 2026

    @radialmonster
    Contributor

    The highlight fix is included in v0.16.0 through #586 and #692. LightCraft recognises when this DNG's sensor clips below the stated white level, then rebuilds partly clipped areas from reliable bright neighbours instead of tinting them pink or cyan. Both the saturation.rs:1 and highlight.rs:1 paths are present in the release.

    Please try the same file and Highlights adjustment in v0.16.0. If the colour cast remains, reply with the settings that show it.

    If this solves it, please close the issue, thanks! If not, feel free to reply with more.

  7. added a commit that references this issue on Oct 26, 2026
  8. crocodeal54 commented on Nov 10, 2026

    @crocodeal54

    Same issue with Nikon's raw .NEF files. Overexposed (yet still not completely burnt) whites should remain white. There it turns bright pink.

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions