3 ms·
Writing a naive PNG parser is easy, but handling all the corner cases is harder than it should be, e.g. text chunk fields can be variable- and even zero-length:
by randy408 6y ago
Writing a naive PNG parser is easy, but handling all the corner cases is harder than it should be, e.g. text chunk fields can be variable- and even zero-length:
1. https://github.com/randy408/libspng/blob/3439bf5c173421b1af4d0f75c23325e99ac67318/spng/spng.c#L2083 https://github.com/randy408/libspng/blob/3439bf5c173421b1af4...
2. https://www.w3.org/TR/2003/REC-PNG-20031110/#11iTXt https://www.w3.org/TR/2003/REC-PNG-20031110/#11iTXt