Categories
Web

Render-Aware Image Formats

Random thought of the day: current image and video asset formats are incapable of handling render-aware operations. Whether it’s SVG, PNG, JPEG, WebP, GIF, or anything else I’m aware of, they are all unaware of their rendering context. That is, there’s no way to say “when compositing against a white matte use this palette, but against black use this palette”.

Currently, this is worked around using asset packs targeted against dark and light mode, but individual assets are still concretely tied to one or the other.

We do see things like HLG as a progressive format, where the additional color information is used only in an HDR rendering context. So it probably won’t be long before we start to more of this context-aware information pushed down to the asset level.

I wonder how long it will be until we start to see composition-aware extensions to file formats? Maybe it starts as simple as concatenating palettes or raster blocks with a flag to pick the correct one. That works okay for simple light/dark situations which are the majority of cases. But it doesn’t take much imagination to end up at a place where an image has a more complex set of operations (multiply, screen, etc) and rules that amount to a tiny rendering VM built into the asset itself.

By Rick Osborne

I am a web geek who has been doing this sort of thing entirely too long. I rant, I muse, I whine. That is, I am not at all atypical for my breed.