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
[css-images-3] clarification on metadata position in specific file formats #8543
Comments
On a related note, PNG originally allowed EXIF to be either before or after the image data. Web browsers ignore EXIF for things like rotation, if it is after the image data. And now that the PNG spec is being maintained again, we made it that EXIF has to be before the image data. https://w3c.github.io/PNG-spec/#eXIf |
I agree that "Authors must produce their image files so that such metadata occurs before the image data in the image file." is harsh if the image format only allows it afterwards. Presumably CSS is not requiring the creation of invalid images. Perhaps
|
Just for some background this issue was spawned from an issue on the Firefox tracker. I argue the spec does not prohibit Firefox from implementing orientation for .webp files. The maintainers seem to think otherwise. |
In case it's relevant, I don't feel that this comment accurately summarizes the discussion in that bug. |
The CSS Working Group just discussed
The full IRC log of that discussion<emilio> chris: we have a requirement for metadata to be placed before some image formats<fantasai> s/pass CR criteria/pass CR criteria and apply to HTML elements specifically,/ <emilio> ... except in some formats that's invalid <miriam> q? <emilio> ... I propose the spec that says that if there is a choice in the image format then put that before <TabAtkins> +1 <florian> q+ <emilio> Proposed: Only ask for metadata before if that's acceptable <miriam> ack florian <emilio> florian: what we proposed is clear for what authors are supposed to do <emilio> ... the other one is a requirement for UAs to ignore metadata-after-data <emilio> ... so what's the proposal for that? <emilio> chris: that is a different issue, we have different behavior <emilio> ... e.g., webp metadata is ignored in some implementation <emilio> ... if you have a giant webp that rotates the image at the end it seems bad <emilio> florian: spec currently says SHOULD, should it be MUST? <emilio> chris: yes <emilio> Proposed: Only ask for metadata before the data if that's acceptable for a file format <emilio> Proposed: Don't require metadata at the start if the format doesn't allow it <dbaron> WebP also apparently doesn't offer progressive decoding <emilio> RESOLVED: Don't require metadata at the start if the format doesn't allow it <emilio> Proposed: UAs must not honor metadata at the end of the file <florian> proposed: ignore layout affecting metadata when it is after the data, even in file formats where there is no choice <emilio> myles: not sure if that's implementable <emilio> q+ <emilio> emilio: dbaron pointed out that webp doesn't support incremental decoding <emilio> myles: right, if no incremental decoding is fine to have metadata at the end <florian> q+ <emilio> ... seems more of a quality of implementation issue <astearns> proposed: if you have started progressive rendering, you SHOULD ignore subsequent layout affecting metadata <emilio> ... I don't think ignoring the metadata should be a requirement <emilio> ack emilio <emilio> myles: I think I'm proposing no resolution at all <emilio> ... then we can outreach PhotoShop or something to prefer metadata at the front or what not <miriam> ack florian <emilio> florian: I don't have that strong opinion on whether ignoring metadata <emilio> ... but having a should and browsers doing different things is bad <emilio> myles: I think we should remove that should from the spec <miriam> ack dbaron <emilio> dbaron: it's probably worth having something like what astearns proposed <emilio> ... even if it's a may <emilio> myles: that's worse right? You end up with the wrong orientation in one browser but not the other <emilio> ... we probably want the same images to look the same once everything is loaded <emilio> astearns: Not certain it's a terrible thing to have different behavior here <emilio> ... you still get the image data and is flipping <emilio> dbaron: if we are going to switch the spec we should have the data on what different implementations do <dbaron> s/spec/spec from must or should for one thing to its opposite/ <emilio> florian: what about text that say that if the UA can't ignore metadata it can't ignore it in some cases but not in other <emilio> ... I think I agree with myles that once the image loads it all should be the same <emilio> miriam: should we take this to the issue / or a different issue? <emilio> myles: sure |
The irc log states that "webp doesn't support incremental decoding", which is false. Both firefox and chrome currently incrementally decode webp. This seemed to be a key part of the discussion, so perhaps it should be revisited? |
https://drafts.csswg.org/css-images-3/#url-metadata
Some file formats require the metadata to be at the end (.webp). I feel it's hostile to ignore the metadata in these files since you cannot change the location, it's part of the image spec. Can we get clarification on whether it should be ignore or not?
The text was updated successfully, but these errors were encountered: