image icon indicating copy to clipboard operation
image copied to clipboard

Encoding jpeg's PixelDensity

Open 197g opened this issue 1 month ago • 1 comments

When migrating to the jpeg-encoder crate from or in-tree version we give up this setting in the API and do not write it to file. The issue here is figuring out a better way of defining such format-specific settings or deriving them from non-format-specific indications such as a high-level representation of it's EXIF data.

See: https://github.com/vstroebel/jpeg-encoder/issues/21

An example of the inverse problem, when decoding: #1958 Notably we never had the pixel density as a separate API for jpeg's decoder so this was rather untested..

From #2636

197g avatar Nov 19 '25 14:11 197g

Does this bit of metadata actually do anything?

The traditional places where DPI was defined have been ignored by browsers, so they've accumulated garbage and became impossible to turn on (at least in browsers), so browsers were looking for a new opt-in: https://github.com/whatwg/html/pull/5574

kornelski avatar Nov 19 '25 16:11 kornelski