4 ms·
IIRC, you could create even smaller PNG files (~50 bytes) that violate the spec but some browsers would render. Probably by omitting the IEND chunk or CRCs. May
by nwellnhof 3y ago
IIRC, you could create even smaller PNG files (~50 bytes) that violate the spec but some browsers would render. Probably by omitting the IEND chunk or CRCs. Maybe this is fixed in browsers these days. Or I mixed it up with GIF files.
- Retr0id 3y agoYou can indeed, if you slice off everything after and including the zlib adler32 checksum. In some situations you might need to add some extra (compressed) padding bytes to flush the pixel data you care about through the parser state machine. This works in every browser I tested (as a consequence of their ability to preview partially-downloaded files) but not in many standalone image viewers (since they usually expect whole files).