April 30th, 2020 at 4:21 AM
So, of course we're all aware of the JPEG compression format. One of my assignments is to actually do this process. As we know, JPEG takes a fairly large image and compresses it down to only a small fraction of the size. Often, almost native levels of quality can be perceived at 1/10 to 1/20 of the size. But, as it turns out, JPEG is a format from the early 90s, and it's still pretty inefficient. In recent years, we've figured out ways to do much better.
JPEG's secret (even in the 90s) is in how it encodes its data. In a gross simplification, it chops up the image into 8x8 blocks of pixels. It then creates a mathematical formula for these 64 pixels, trying to get a relatively similar output to the original block. With 64 pixels in each 8x8 block, you won't find a tiny formula that represents them perfectly, but you might find one that gets close.
When you increase your image quality settings, you're actually giving the encoder more room to encode a larger "formula". The encoder doesn't have to throw out as much detail to get the encoding to fit within the size constraints. This is actually done using a method called discrete cosine transformation, and is the same method used to encode Ogg Vorbis files (but the technical details here are something I'll discuss on another post). In short, there is quite a lot of science and math behind it. However, the downside is that when you're working with 8x8 chunks, there's still a lot of efficiency that's lost.
JPEG 2000 is quite a bit better than JPEG, and it does this by using a completely different algorithm entirely. Rather than taking 8x8 blocks, it takes the entire image, chops it up into arbitrary blocks, and stores the differences between them. I'm still researching this currently. I'm not entirely sure how this works as well as it does, but the video below is all you need to get a feel for just how powerful this compression actually is. The top right is the corner you want to look at. Voodoo magic at this point. Absolutely amazing how well it does, even at ~15KB file sizes.
Make sure you turn it on HD! Slow it down to 0.25x speed to truly get a good feel. To whoever did this video, you did it justice.
Sadly, JPEG 2000 is not widely supported. Most photo editing programs do support it, but web browsers are hit or miss. Chrome doesn't support it at all, which pretty much puts the nail in the coffin.
JPEG's secret (even in the 90s) is in how it encodes its data. In a gross simplification, it chops up the image into 8x8 blocks of pixels. It then creates a mathematical formula for these 64 pixels, trying to get a relatively similar output to the original block. With 64 pixels in each 8x8 block, you won't find a tiny formula that represents them perfectly, but you might find one that gets close.
When you increase your image quality settings, you're actually giving the encoder more room to encode a larger "formula". The encoder doesn't have to throw out as much detail to get the encoding to fit within the size constraints. This is actually done using a method called discrete cosine transformation, and is the same method used to encode Ogg Vorbis files (but the technical details here are something I'll discuss on another post). In short, there is quite a lot of science and math behind it. However, the downside is that when you're working with 8x8 chunks, there's still a lot of efficiency that's lost.
JPEG 2000 is quite a bit better than JPEG, and it does this by using a completely different algorithm entirely. Rather than taking 8x8 blocks, it takes the entire image, chops it up into arbitrary blocks, and stores the differences between them. I'm still researching this currently. I'm not entirely sure how this works as well as it does, but the video below is all you need to get a feel for just how powerful this compression actually is. The top right is the corner you want to look at. Voodoo magic at this point. Absolutely amazing how well it does, even at ~15KB file sizes.
Make sure you turn it on HD! Slow it down to 0.25x speed to truly get a good feel. To whoever did this video, you did it justice.
Sadly, JPEG 2000 is not widely supported. Most photo editing programs do support it, but web browsers are hit or miss. Chrome doesn't support it at all, which pretty much puts the nail in the coffin.