Fwd: Puzzling of PNG Error Handling

-------- Forwarded Message --------
Subject:  [Moderator Action] Puzzling of PNG Error Handling
Date:  Thu, 29 Jun 2023 19:30:37 +0000
From:  DLiang Fun <dliangfun@gmail.com>
To:  public-png@w3.org



Dear PNG Working Group,

I hope this email finds you well. I wanted to bring to your attention a 
minor matter regarding the PNG specification on error handling.

1) In regards to chunk types, the specification clearly states that each 
byte in the chunk type should be limited to ISO 646 letters (A-Z and 
a-z). Therefore, it appears reasonable to report errors if this 
condition is not satisfied.

2) The Error Handling section explicitly states that encountering an 
unknown ancillary chunk is never considered an error.

Now, here's the silly question that arises: If a chunk type contains 
non-ISO 646 letters but is still an unknown ancillary chunk, should we 
report an error?

While reading the specification, I do have the feeling that we should 
not report an error in such a case. However, the specification does not 
explicitly indicate that, in case of conflicts, we should follow the 
Error Handling philosophy first.

I have observed divergent implementations regarding this matter. 
Specifically, while libspng and lodepng choose to ignore the chunk in 
question, libpng halts the parsing process and reports a fatal error. 
Hence, I believe it would be beneficial to explicitly clarify this 
aspect in the specification.

I kindly request your consideration and input on this topic. Your 
guidance in ensuring consistency and clarity within the specification 
would be greatly appreciated.

Thank you for your time and attention.. I am looking forward to hearing 
your insights on this matter.

Best regards,
Dliangfun

Received on Saturday, 1 July 2023 14:55:42 UTC