Skip to content

[css-images-3] Inconsistent but non-normative advice regarding image metadata and streamability/progressive display #10075

Closed

Description

@svgeesus

In 2.1.2. Image Metadata:

Authors must produce their image files so that such metadata occurs before the image data in the image file. (Note: This is the default for most images already.)

User agents should ignore any layout-impacting metadata (such as orientation or resolution) that occurs after the image data begins in the file. (Note: This rule does not impact metadata that does not affect layout, such as color space information.)

This assumes that layout changes after all the image data has loaded are a problem, while color space changes after all the image data has loaded are a not problem. They are.

As an example, PNG requires that all color space-affecting metadata cHRM, gAMA, iCCP, cICP occurs before the image data (and before the palette, if there is one). This is done specifically to avoid a jarring repaint of the image in different colors.

Other image formats might not impose such a constraint, and thus images will be found where that metadata is after the image data.

Consider a 100-frame animation, which is also on a slow connection; once all the image data loads, suddenly the current frame, all subsequent frames (and for looping animations, all subsequent iterations) have a different appearance.

Suggested fix: delete the informative (and thus, non testable) note "This rule does not impact metadata that does not affect layout, such as color space information".

Activity

  1. svgeesus commented on Mar 16, 2024

    @svgeesus
    CollaboratorAuthor
  2. ByteEater-pl commented on Mar 17, 2024

    @ByteEater-pl

    It's unsettling that the fragment mentions files – a concept mostly foreign to Web standards – instead of resource representations. If understood literally, it's narrower and probably doesn't cover over 99% cases of online usage.

  3. ByteEater-pl commented on Mar 17, 2024

    @ByteEater-pl

    More to the point raised, it assumes a lot about architecture of user agents. If they rely on an external component, e.g. an OS library, to handle some image format, and that component doesn't support conditionally ignoring metadata based on its location, this requirement becomes unimplementable. It's just a SHOULD, but the outcome of having the metadata ignored in some implementations but not others seems highly undesirable.

    Another problem is that it may be difficult for authors to follow this guidance. I know of no graphics authoring software that outputs images in a format allowing metadata to be placed at either location and specifically exposes this choice.

  4. changed the title [-][css-images-4] Inconsistent but non-normative advice regarding image metadata and streamability/progressive display[/-] [+][css-images-3] Inconsistent but non-normative advice regarding image metadata and streamability/progressive display[/+] on Mar 19, 2024
  5. added a commit that references this issue on Mar 20, 2024
    bc4fff0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions