w3c / PNG-spec

Maintenance of the PNG specification
https://w3c.github.io/PNG-spec/
Other
43 stars 10 forks source link

Add private bit depth and colour type fields #451

Closed ProgramMax closed 3 weeks ago

ProgramMax commented 1 month ago

In Second Edition, all fields were allowed to have private values when the value was 128 or greater.

This shouldn't have been all fields, since some rely on values greater than 128 such as height and width.

Third Edition explicitly listed fields which could be private. Currently, it lists 3 of the 5 IHDR fields (ignoring width and height). However, those other two fields would be useful as private, too. Those fields are bit depth and colour type.

This commit adds those two fields to the list of explicitly allowed private fields.

Closes #446

ProgramMax commented 1 month ago

@jbowler Here is the patch for your suggestion. Thank you for catching that.

The "bit depth" field intentionally does not link anywhere. Elsewhere in the doc, we talk about bit depth without links. There is no section specifically defining it or an entry in the definitions.