-
Notifications
You must be signed in to change notification settings - Fork 719
[css-images-4] It's unclear what "intrinsic resolution" mean in 6.1 (image-resolution: from-image). #4881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think it can be anything: format/implementation-specific. It's been intentionally unspecified. See this discussion (source), re:
For instance, PNGs have a dedicated piece of metadata for this, that isn't EXIF. There were a couple of discussions about how “inches” and “centimeters” in metadata – which may have initially been intended to affect printing – should be interpreted, in CSS. It was ultimately resolved that they should be interpreted as CSS
There was also a discussion about this, which resolved on:
There's an open issue about this, but it also doesn't appear to have made it into the spec. (Note! That while the primary use case discussed the old mailing list posts about this was weird content from weird scanners and/or fax machines, I actually have a reasonable, modern, use case for this, now, I think: low-resolution image placeholders) |
If nothing in the intervening seven years has undermined these WG resolutions, I could get a PR or two together, with:
|
Actually, it looks like there was a big discussion in 2014 about what to do when intrinsic resolution was not 1:1. After reading it through a couple of times, I'm not totally clear on what direction folks wanted to go; @tabatkins any guidance on what happened then, or perhaps since? |
I think that now that |
If the image's metadata specifies it's intrinsic resolution is not 1:1, I don't see any way to satisfy I expect this feature is primarily of interest for print output, where anisotropic scaling of images is trivial. |
Thinking of printing, I'm wondering how |
Inches, mm (used in PNG), pixels and points all have fixed relationships in CSS values: 1in = 72pt = 96px. This applies in all media, print or screen. So provided the metadata specifies a resolution, it's unambiguous. If there is no resolution metadata, then a pixel is just a pixel: the resolution is 1dppx = 96dpi. As for the relationship between "CSS pixels" and actual physical pixels, well that's a different matter altogether. See #614 - still going strong, despite being closed for two years. |
Ok, so if I understand correctly - 72dpi in EXIF stands for Pt per inch, and is equivalent to 96dpi in css (which stands for px per inch). Thanks for the clarification! |
Is it EXIF-based resolution-x/resolution-y? How does it work when they're not 1:1?
Is it based on something else? Format specific?
The text was updated successfully, but these errors were encountered: