Back to Blog

design-creative

BT.2020 HDR PNG Generation: Stop Repeating One-Off Scripts

A practical skill for generating validated BT.2020 HDR PNGs from EXR, nits arrays, or linear RGB—built for agents.

OpenAgentSkillPublished:

Where this fits

You're an agent tasked with producing a test HDR image for a Discord channel or verifying a PQ ICC profile. You have an EXR render, a nits array, or a linear RGB buffer—and you need a BT.2020/BT.2100 PNG with correct PQ encoding, cICP chunk, and 16-bit depth. Without a standard workflow, you'd write a throwaway script, debug color space conversions, and likely get the transfer function wrong. This skill packages that plumbing into a single, repeatable command.

Why agents benefit

  • Eliminates trial-and-error: The skill encodes the exact sequence for converting AP0/D60 or BT.709 data to BT.2020, applying PQ/ST 2084, and writing a 16-bit PNG with a cICP chunk—no more guessing.
  • Validation built-in: It checks the generated PNG for correct color space metadata and luminance ranges, so you can trust the artifact without manual inspection.
  • Handles multiple input types: Accepts EXR, linear RGB arrays, nits scalar maps, or analysis images—so you can feed it whatever your pipeline produced.
  • Prevents repeated one-off scripts: Instead of spawning a new Python or ImageMagick command each time, you call one skill with consistent arguments.
  • Targeted for modern viewers: Produces files that render correctly in Discord and Chrome, which have specific HDR PNG expectations—critical for sharing test results.

Practical scenarios

Verifying an HDR ICC profile with cicpTag

You have a custom PQ ICC profile and need a test image that exercises the cICP chunk. The skill generates a BT.2020 PNG with the correct cICP values, letting you validate how your profile interprets the metadata.

Converting a linear EXR render for a client review

Your agent receives a linear RGB EXR from a render farm. You need a viewable HDR PNG for a client who uses an HDR monitor. The skill converts to BT.2020, applies PQ encoding, and outputs a 16-bit PNG with proper diffuse white and peak nits—ready to send.

Creating a test pattern for a Discord HDR channel

You want to verify that Discord's HDR preview handles bright highlights correctly. The skill generates a ramp or checkerboard (using the companion hdr-test-pattern-generation skill) and then wraps it in the correct BT.2020/PQ/cICP container for reliable rendering.

Add it to your agent workflow

Install the skill with:

npx skills add clshortfuse/renodx --skill bt2020-png-generation

Then invoke it with an input image, source color space, nits values, and output path. For example:

# Convert an EXR (AP0/D60) to a BT.2020 PQ PNG with 1000 nits peak
bt2020-png-generation input.exr --source ap0-d60 --diffuse 100 --peak 1000 --output hdr.png

The skill handles the rest: color space conversion, PQ encoding, cICP injection, and validation.

Compare before adopting

Before committing, compare this skill against alternatives like raw ImageMagick commands, custom Python scripts, or other HDR tools. Evaluate:

  • Quality signals: Does it produce visually correct results across viewers? Check if it handles edge cases like out-of-gamut colors.
  • Maintenance freshness: Is the underlying RenoDX repo actively updated? Look at commit history and issue responses.
  • Alternatives: Could a simpler tool suffice for your specific input/output types? The skill shines when you need consistent, validated output without reimplementation.
  • Workflow fit: Does it integrate with your existing agent's file handling and argument passing? The skill's argument hint matches typical CLI patterns.

Why it is worth tracking

This skill is backed by RenoDX (3.7k stars), a well-maintained project with a clear focus on HDR imaging. The skill itself is narrowly scoped but deeply useful—it removes a known pain point for any agent that touches HDR PNGs. As HDR displays become standard, expect more workflows to require BT.2020 output. Track this skill to stay ahead of one-off script rot. For a full listing and updates, see the skill page. Evaluate it now if you routinely produce or validate HDR images; it will save hours of debugging color math.

Featured Skill

bt2020-png-generation

Skill by clshortfuse