3 ms·
Can I know why?
by jacksontale 11y ago
Can I know why?
- Ono-Sendai 11y agoThe way JPEG works is by dividing up the image into 8x8 pixel blocks, then transforming each block using the discrete cosine transform (DCT). If you look closely at a JPEG file, especially at low quality settings, you can see the edges of the blocks. This means that artifacts have been introduced during the compression of the image. PNG however, is a lossless image compression format, meaning that no artifacts will be introduced by saving and loading an image in PNG.
- jacksontale 11y agoJust tried, but seems not that different ---------------- PNG: https://raw.githubusercontent.com/MassD/typeocaml_code/master/visualise_randomness/random_plot_time.png https://raw.githubusercontent.com/MassD/typeocaml_code/maste... ------------- JPG: https://raw.githubusercontent.com/MassD/typeocaml_code/master/visualise_randomness/random_plot_time.jpg https://raw.githubusercontent.com/MassD/typeocaml_code/maste...
- Ono-Sendai 11y agoYou have a very high quality JPEG in this case, even bigger than the PNG. So there aren't visible artifacts in this case. It's more of a general principle.
- jacksontale 11y agoah ok, thanks.
- jacksontale 11y agoBut anyway, I updated teh post, so people could be aware of this diff.