2 ms·
PNG compresses the image data using the DEFLATE algorithm. You can write data that decompresses to almost 1023 times the size of the compressed data. So if you
by tinus_hn 10y ago
PNG compresses the image data using the DEFLATE algorithm. You can write data that decompresses to almost 1023 times the size of the compressed data. So if you allow 1 MB images, be prepared to allocate memory for and process about 1 GB of data.
- Rusky 10y agoPNG also explicitly specifies image dimensions, so there's no need for that at all.