Interestingly enough, the "no JPEG for scientific images" statement is a very real consideration for space missions. Now I'm pretty sure they don't actually use JPEG, but for New Horizons which is about to encounter Pluto, ALL of their images will be compressed in a lossy way. At that distance, bandwidth is very limited resource. Since they'll be flying past Pluto at a ridiculous speed, they have opted to apply lossy compression so they can get significantly more data back home. A good knowledge of what kind of compression artifacts are caused by the specific algorithm in use will be required to thoroughly clean up and analyze the images.
Niosus all those people that see artificial alien structures on other planets (because they are looking at compressed images) are going to have a field day
wolpertinger Yeah... Ah well, they see that on Moon images as well, after they copied a low-res JPEG thumbnail off some website and blew up the contrast, brightness, levels and whatever slider they could find. And if they can't find anything, it's because it is air-brushed! "Evidence" for the conspiracy supports it, evidence against the conspiracy also proves that there's a conspiracy. There's no point in giving them any attention at all.
Niosus AFAIK, NASA generally uses VQ based image compression (loosely similar to texture compression on the PC), and then further compresses this with an LZ77 variant (LZO), which is loosely comparable to Deflate (just is a little computationally simpler due to not using Huffman coding).
Brendan Bohannon According to Stuart Robbins, one of the scientists working with New Horizon's data (mostly focused on craters) and also a podcaster, they use JPEG for (at least some of) the images. He posted a while back that there was something that looked very much like a crater but turned out to be a JPEG artifact. Obviously I didn't know this when I posted my initial comment. If you want, I can try to dig up his post for the sake of providing a source? However this is just the first batch of images. If I recall it correctly, it will take over 2 years to transmit back all the data in its full glory. As long as you know the downsides of JPEG, there are a lot of things you can still learn from those images. The finer details will come to light when the scientists get their hand on the full resolution/quality images.
Another area where i find that JPEG falls short is in technical drawings, such as electronic circuit diagrams. I am an electronics hobbyist, and therefore often consult datasheets of various ICs, but i find that many, especially older, datasheets are often difficult to decipher due to artifacts. Just my two cents.
I usually don't have an issue picking up on stuff as I watch an informational video, but there's so many technical details in this, that I need to go watch that "how a jpeg works" video, and come back to this. I love it though. Learning the in depth details about something makes me feel like I actually know how it works. I always need to know the how and the why down to the smallest detail before I'm satisfied. This channel makes me research so much, and like I said before, I love it.
He mentions text, but this applies to anything that's not a photograph, basically. Drawings and animation are the same, it's the sharp lines you want to preserve, not the general swaths of colour.
9 років тому+388
People shoot in RAW not because of end result as-is, but because of the data in the image that can be used to edit the photo.
Toni Lähdekorpi And often you can fully re-expose the image in photoshop or similar if you have all the raw data.
9 років тому+28
It's still a bad idea to not use JPEG or WebP if you want to share the final versions of your photos on the web, since they are only meant for viewing.
It seems we are in agreement. If you want to be able to do post processing on an image capture RAW. Afterwards, for the love of bandwidth, save the final as something else.
+Joaquin D (Joax) dude, HOW. you cant just read 1 sentence and claim that that guy is the reason why people dont believe in the future of humanity. come on. infact, how could anyone not believe in the awesome future of humanity? humans have been getting better and greater for a long time. they can literally only get better.
I prefer using .png most of the times for small images the file size is smaller, and the image quality is better. I'm not sure at what size .jpeg files become less file size than .png, but .png works for my purpose.
@@Folopolis Not for really small images because PNG can compress those well and JPEG probably has overhead from storing the things needed for the compression to work
@@circuit10 in my experience, PNG is only better than JPG at sizes of like, 50x50 or 100x100. Anything higher, and JPG wins out almost all the time for all practical purposes. Like, of you're gonna use PNG at 500x500, you might as well just use JPG at 100% compression, and you'll likely still get a smaller file size. Of course this doesn't count if the image is mostly text and/or dealing with low colors like clip art and rasterized vector graphics.
It's not so much about the size but how much of the image is blocks of one colour that decide whether a .png will be a smaller file than a .jpg. Generally .png is always a smaller file for things like screenshots of computer programs or web pages. You can easily try this out by saving a screenshot of these UA-cam comments as .jpeg and .png - so much of the image is single colour background that the png should be a much smaller file and would have no loss in quality because (I think) it's lossless.
Around about 1990, back when hard drives were a lot smaller and people still used floppies a lot, JPEG was an absolute revelation. The idea that you could take a photorealistic image and reduce the file size by a factor of 10 with no perceptible difference in image quality was stunning.
When I first started working in film, I was actually surprised when I found out the extent to which they used JPEG for pretty much anything that didn't have to be HDR, which I presumed at the time to be too artifact-ridden to be of any use. That said, it wasn't standard "web" JPEG. It was generally 16-bit-per-channel, and mapped to Rec.2020 or DCI-P3 gamut rather than sRGB. The idea with 16-bits per channel was based on the hope that the quantization errors like those described in the video would be reduced to such a small order of magnitude that they'd not be noticeable, and you'd anyway be mixing this with all nature of modifiers to the extent that errors like that would get lost in the mix. That said, it's not as if we used high degrees of compression either, but JPEG at 98% quality is still significantly smaller than anything lossless, so that was the real point. Counts for a lot when you've got several hundred GB of data shuffling about for a single 20-second shot.
Nearly everyone has forgotten about variable jpeg compression within the same image. You can apply different levels of compression to different parts of the image - selective optimization.
@@bluesailormercury I know Photoshop allowed this in the past, but you had to manually set the mask and pick compression values. I haven't heard of any current software that does this. Also, yes, in theory you could have areas with 100% and 0% quality in the same image. I don't think it worked like a gradient though, you just maksked areas that should have used less compression and that was it.
As an astronomer I have to interject here. I run an imaging camera onboard a telescope and all our files are in the FITS format architecture. We need to retain the exact photon values for each pixel in order to be able to accurately measure stellar photometry, spectra (via grism), and to look for any artifacts. JPEG would completely compress this data making it completely poor for real science. Plus the issue of going from high luminosity to low luminosity would be a major issue with JPG given that stars basically go from thousands or even tens of thousands of photon counts to effectively 0 for space. Cosmic rays are even worse than that because they're not gradual like stars are with their 2D gaussian like profiles.
Astronomy is an example of extremely wide dynamic range data (there are others, like audio and data from seismometers). Technically JPEG doesn't even solve the photography problem, as it assumes that images are "flat" to eight bit, already. That's nowhere close to the actual dynamic range of typical terrestrial scenes, either. It's a file format that needs to disappear. It is obsolete now that we have sensors capable of 16 bit of dynamic range and more.
@@schmetterling4477 I agree JPEG and sRGB need to die already. Also the abysmal state of color management across the devices. We should have had HDR displays 10 years ago. Considering the colossal importance of imaging the improvements are made at a glacial pace.
The whole "shooting in RAW" thing is like this: During the entire production chain of a photograph, you want to keep as much information as possible. Only during the final step, publishing, it makes sense to publish as JFIF to get some "workable" file sizes. Same for any other industry (video, music, etc...)
Well the biggest issue that raw solves isn’t the lack of the ringing artifacts (say if you photograph text) it’s more for preserving color and luminance. And when color grading video or white balancing a photograph if you’ve run it through a lossy block compression the color cast you are trying to correct out has been altered randomly per block due to the compression. Best way to look at this is to take a jpeg and look at the color histogram after compression and you see these spikes which is where the algorithm has crushed the colors into bands.
After all these years of being troubled by the appearance of speckles, this Computerphile upload helps me to better understand their presence. When making a collage where some of the images used had text with speckles, it added to the time needed to make the collage. Cleaning up the speckles is such a chore.
+Computerphile Could you do a video discussing techniques for interpolation in general, covering the different methods and algorithms used to accomplish it?
Hey! I'm really interested in the JPEG image compression and am conducting my own research as a high school student on the same. I am not very proffiicient in coding but I want to explore this using mainly mathematics. I am having difficulty finding code or libraries that I can use reliably to get values like yours in the videos. I would really appreciate if you could share that. Thank you!
The difference between JPEG and RAW is *more* than just compression, it also loses additional sensor data that makes JPEG images harder to edit after the fact. It is extremely difficult to fix JPEG white balance in post for example, but it is very simple to do with RAW.
+tankermottind It's not just red text. It's very common to downsample the color information to half or a quarter of the pixels in the original image because humans have poor color vision compared to their ability to differentiate intensity so colored text will have been screwed up a bit even before the normal compression takes place. In any case, jpeg and mpeg was designed to compress natural images, not artificial ones containing fonts that are one pixel wide.
Gnomefro I just know that in video footage of FreeSpace 2, HUD graphics and text in red are always harder to read than any other color (green usually being the easiest).
What an amazing series! Thank you Ive always wanted to figure out how that works and now I have a much better idea. The guys that came up with these compression methods are genius!
I still credit JPEG for speeding up the early internet. Anybody still remember BMPs/GIFs as the common format on early internet? It used to take a few MINUTES to render a picture. Let that sink in a bit.....
When I saw the title, I thought you will discuss blocking and lack of "overlap" in the transform to counter it, as described in, "Applying the MDCT to Image Compression" or the upcoming Daala standard.
Why does it screw up a solid white bitmap? Surely that should just be 100% wave 1 and decompress back to solid white but it comes out as different shades of grey and beige.
smegskull If it's _really_ just a single color in a block, it _will_ preserve that with just the DC coefficient (though the exact color might vary due to colorspace conversion). The problem comes when you have sharp details within the same block. Then you have waves that cover the entire block, and compression that gets rid of some of the waves that would cancel where the solid color should be.
Daniel Dawson It doesn't though. I get it when I use paint all the time If I save as a bit map and use the paint fill it fills everything but If I do it with a jpeg I end up with clouds everywhere because huge chunks of white are now just off white.
I'd say that's a problem with the software, then, or there's something you're not understanding somewhere. I just tested it with GIMP, an open-source application along the lines of Photoshop. Created a small solid pure white image, saved it as JPEG, *minimum possible quality setting*, unoptimized, etc. Opened it back up. It's still a perfect solid pure white. Conclusion: JPEG has no problem with solid-colored blocks. My advice: try something other than MS Paint (if that's what you were referring to). It's not known for being great graphics software anyway.
Daniel Dawson "try something other than MS Paint. It's not known for being great graphics software anyway." You Sire, win the Understatement of the Week Award!
Wouldn't it be smarter to use a format that incorporates RLE + LZW in that situation anyway? You are crashing a car in the wall, then yelling at the engineer because you didn't understand how a steering wheel works.
As an artist and graphic design specialist, I often use formats as PNG, however JPEG is still awesome and I use it for various purposes. Depending on compression, final images do look absolutely awesome in it. But it really comes down to image content, if it even makes sense to be used. A lot of details (like in photos) make JPEG relevant, but if there is a lot of plain coloring, PNG usually makes a lot more sense, because PNG always retains original, uncompressed colors, but still can be compressed and so images with big areas of same coloring can even be smaller in file size than JPEG. Both formats were first released in the 90s. For that, they are still highly relevant and awesome.
Re-encoding doesn't result in generation loss? In theory yes, but in consumer software it actually does get worse after hundreds of saves. Is this because the quantization table changes for each save, or is the quantization table static and there's another reason?
I never use jpeg, switched to PNG and really happy with the quality. My camera, like most does use jpeg compression, but I also have RAW which can be compressed later, so RAW is the way to go.
True if you are serious about photography you really should shoot RAW, the ability to change image processing parameters after capture is to valuable to pass. Even considering the logistical problems with RAW.
It's worth pointing out that even at minimum compression, as in, you don't low pass filter the DCT values at all, the output image still isn't exactly the same as the input. Its very close, but not the same.
As others have pointed out, shooting in Raw is done for greater flexibility when it comes to editing images. It would be great if you could do a video explaining the processes behind adjustments like brightness, white balance, etc. Then maybe talk about the advantages of higher bit images, sounds, or other information when it comes to adjustments. There is a huge practical advantage to editing 12 bit files as opposed to 8 bit JPEG images. Come to think of it, is the greater flexibility due to the lack of JPEG processing, the greater bit length of Raw files, or both? Another good video idea...
There is another problem with JPEG, and that is if you push the compression too hard even on images without sharp edges in them, it ends up looking blocky. There is another compression technique, known as “JPEG-2000”, that uses wavelets instead of DCT. Here when you push things too hard, it gets fuzzy rather than blocky, which many people feel is less objectionable.
Why don't they check the euclidean-distance between the original image and the quantized image? If it's to high, they could decide to store that block uncompressed or try a different quantization matrix...
Paradoxic definition points: 1. Did JPEG'ers not-understand that they were to remove, high-frequency artifacts, not just not-compute them... 2. GIF'ers had a similar trouble with pixel-quantum-level speckles that realistically indicated lower-frequency threshold-crossing....
But if you use a reasonable high quality factor(low compression) then you end up having a non-visible loss of quality while at the same time a better compression than e.g. png. We testet this ourself with a lot of documents, and on mobile it is just not worth sending a 4mb(or even more) png, whereas an image with jpg is only 600kb or so and looks really the same (you don't see any difference even on a pixel basis)
How about compressing areas in different rates? For example. Mostly of the image would be compressed with 90%, but the text area would be compressed with 10%
Xano Trevisan Kothe The problem is, how do you know where the text is? All you have is low and high frequency data. High frequency data might indicate text, or it might just indicate random noise which can be thrown away with no perceptible loss of quality.
You could do the DCT for each block, then, then see whether each block is mainly high or low frequency content, create a low resolution mask for the entire image and use two different weights depending on if its a high frequency or low frequency area
alternatively jpeg could have had a process to subdivide blocks that are particularly busy into smaller ones, compressing the blotchy and underutilized expanses of color and space around the busy regions, however this would have only mitigated the problem of the blocky artifacts, rather than completely eliminate them. Granted ideally the blocks would be much smaller
Would it be possible to create a Huffman table that is optimized for these sharp changes? Or at least one that is better for text, without having as large a file than if you just used super high quality?
Why not just programmatically determine the quantization table to use, based on the cosine waves that are most / least common in the image? Because the file keeps the table, I don't see any reason to use a static quantization table for all images, other than that it would make compression faster (and it's usually "good enough").
Is there another image compression format that works better with sharp color changes as seen with text and similar images or does image compression in general have problems with this?
Is it possible to use an adaptive matrix? Setting to 0 the ones which will cause the smallest overall changes in the values? Would the way to do that just be to remove the smallest values?
When you transfer a JPEG file (either by Sending to another Hard drive or Copy & Pasting) eg backing up photos to second Hard Drive, is there a loss of Image Quality on each successive transfer of the JPEG file or does it remain as the original JPEG quality?
+Kris Vette No, a copy paste operation is an exact bit copy of the file, as in, it streams the file from disk into memory and then saves that stream to wherever you pasted it to, without changing anything about the files contents. You can copy a copy of a copy to the nth degree and the last one will be exactly the same as the first. :)
Faissal Bensefia PNG has its place, but isn't great for everything. PNG-8 is similar to GIF, but it can store a single alpha channel. Unfortunately it can only store 256 colours which makes it bad for photographs. PNG-24 is fantastic because it can store thousands of colours including multiple alpha channels, but it will be a much larger file size compared to JPEG (like 5X), and won't be noticeably better quality then JPEG. So you shouldn't always be using PNG or JPEG. You need to switch the file type depending what the image is, and how you intend on using it.
I'd propose a hybrid type or a newer version of jpeg that supports non-compressed regions that a user with an editor could select text areas to exclude compression in the particular locations.
What I wouldn't give for a hybrid between JPEG style compression methods and a second "layer" with rendered text. Changes are it would be smaller than a lossless format anyway.
Mansen EPS can do this. It can include an arbitrary mixture of raster graphics with JPEG compression and vector graphics and is still primarily an image format (so it's embeddable), not a full document.
Mansen For that you'd need OCR to read the text from the image and inpainting to calculate what's behind the text. But these technologies are currently neither completely accurate nor fully automated. I think a format like that would require AI and computing power that we don't have yet. But maybe in a few years.
yondaime500 Uh... no you don't. OCR is reading text FROM an existing image. I am talking about the original production of said image with text separate from raster layers... As Totoritko mentions, EPS can do this - So can "workspace" formats like PSD, but those are far too heavy to share, and won't show in browsers anyway.
Something I noticed that wasn't really mentioned was that the colored text looks much worse than the black and white text. I'm guessing that's because of what you said earlier that the chrominance gets compressed even more strongly than the luminance. So red text especially looks very washed out. I've noticed that before on other compressed things, red text on video often looks awful. I'm guessing it's essentially the same thing, if you don't expect small changes in luminance, you certainly don't expect small high frequency changes in chrominance. I never quite knew why that was, just that it was annoying.
RAW usually has between 12 to 16 bits per color (14 being most common) vs 8 bits for JPEG. You might not be able to see it straight out of the camera but in editing you can pull out details in highlights and shadows. So for any serious editing, you'd be better off with RAW.
What if you essentially reversed the process? told the jpeg compressor to compress the low frequencies, and keep the high frequencies? What if you implemented a two pass compression system, whereby if an output image differs substantially from the original than you change the coefficients in that area and then re compress the original image? I guess I see that you've just shown that there is a way to exactly measure the quality of the output, it would seem like the compressor could use that information to produce a better overall image
Thank You Daniel Dawson and theguycalledchris. I can see now how reversing would be a problem. I do use PNG for most everything, but I would like to see JPEG improve to reap the benefit of a lossy compression while improving image quality. What if for the two pass compression you introduce 2 to 5 coefficient tables. Each table would be determined by the results of the 1st pass. This should, I would think, add only a little extra overhead.
veggiet2009 That's more reasonable, yeah. The tricky part will be figuring out an optimal set of tables (BTW, they're called quantization tables, because the coefficients get quantized by being scaled down; most of the compression in DCT applications comes from quantization) and maybe when to apply each one. The latter could probably be achieved by simple trial and error.
I shoot raw, save in raw, unless I need to upload it some where. Storage space is cheap so that not really an issue. 14 bit raw image gives post processing a lot more flexibility, 32 bit HDR stored in DNG can be a bit of a drag though
If you find you save a lot of images in raw that you never or rarely look at, what you could do if you ever need to save more space is put them in a compressed archive, say .zip or .tar.gz, and then extract when needed or use an image viewer that supports viewing images in compressed archives whenever you need to look at them.
You can't shoot in jpeg, you're camera always shoot in RAW. Then it can convert it to jpeg. But doing so it makes decisions about white balance, colour balance, added sharpness, enhanced contrast and more. That's why we shoot in RAW, to let us decide how the final image will look and not let the camera decide.
A big downside to JPEG is that it doesn't take alpha into account like PNG does. So then you're stuck with just rectangles. Which is fine is some cases, but with lots of graphical design things, it's not.
Oh for sure. If you are working with Photoshop, for example, you definitely don't want JPEG source images in your project. JPEG has limited relevance these days (it was mostly useful back in the day when transmission bandwidth was low/expensive) other than it's usefulness as a part of MPEG/MP4 etc compression.
»Most people swear by shooting in raw and good luck to them?« What does he mean? Seemed like he was scoffing. The reason for shooting in raw is, that you get the actual uncompressed "raw" data from the CMOS sensor of the camera. Which is brilliant if you want to do any kind of post processing with the image. Colour corrections, contrast etc, or even more elaborate manipulation. You don't want to lose information before you've done that. It always depends on what you want to do with the file. If you are a photographer or a graphics artist who wants to do some post processing and image manipulation: get the image as clean as you can, don't lose any information you may later need -> lossless! If you want to archive the image long term, then some lossless format may be a good idea as well. It depends a bit on storage cost. If you want to distribute the image for display on the web, then save bandwidth, compress the image and use jpeg. (although png seems like the better choice to me) Bottom line: Shoot in raw if possible, process the image, then convert to other file formats for archive/distribution.
frustbox He was probably just trying not to offend anyone that actually uses JPEG, there is a few people left still using it that defend it as much as possible despite their arguments being about as valid as a creationists.
Heh, I may have been scoffing a little! I should probably have explained it better. I have no issue with shooting in raw then converting later. However, I do disagree with those claim that anyone shooting in Jpeg is inherently bad at photography. There are obvious benefits to both approaches.
magottyk Ye, RAW is just undeniably better quality and far more flexible. The only time you would sacrifice that is for the burst mode and not having to edit, which is only useful for time sensitive reporting, like sports. However if somebody is shooting weddings on JPEG they are a horrible photographer, jpeg by default makes their hit rate and final product worse and they aren't providing the service they should be.
oBLACKIECHANoo I'd sack any photographer who couldn't provide me with the raw images on request. Considering that today we have uhdtvs with a resolution of 3840x2160 which is about 8 mega pixel equivalent and not in the same aspect ratio as cameras (you'd want at least a 12 MP cropped image to suite 1:1), with the next gen standard to be double that again which equates to 32MP and again a different aspect ratio. Those displays will show up all the flaws of JPEG. and yes I can see the boxing artifacts of JPEG and I've got crappy eyesight. Where once we were constrained by technology, that is no longer the case. If you're paying for the images from a professional, then they have no excuse to be shooting in JPEG only. Consideration can be given to any continuous shooting sequence as that is still constrained by technology.
I can't wait for AVIF support to become as common as jpeg. It blows both jpeg and WebP out of the water in quality/size, and it also supports 10 and 12-bit images. (imo the fact that almost everything is still on 8bpc is one of the most ignored shortcomings of modern image compression systems.)
This would be so much better with a link to the actual algorithm, to something the shows the actual math involved in the compression. I'm sure its complicated, but as is its like hearing about variable in an equation without seeing the equation, so it comes across as what everyone already knows with restated in jargon most do not.
I actually created a Python script that uses OCR to detect text and create a kind of mask for relevant blocks. It then saves this mask out at a separate compression than the rest of the image. Not sure why users don't at least have an option for this in 2024 now. Obviously lossless exists but yknow.
Cool. Two decades ago I decided to use .gifs for text/title graphics and jpegs for photos/artwork just by the way they looked. And this was the reason. Nice to know.
So I use mc paint for my art and it was driving me insain that for the last few years if I had text I had one save because of the artifacts messing with it after was impossible...now I know why ...thank you so much
It's crushing to change a background color and find the text is surrounded by negligibly different pixel fur. One (imperfect) approach is to reduce the colors, even to monochrome.
Interestingly enough, the "no JPEG for scientific images" statement is a very real consideration for space missions. Now I'm pretty sure they don't actually use JPEG, but for New Horizons which is about to encounter Pluto, ALL of their images will be compressed in a lossy way. At that distance, bandwidth is very limited resource. Since they'll be flying past Pluto at a ridiculous speed, they have opted to apply lossy compression so they can get significantly more data back home. A good knowledge of what kind of compression artifacts are caused by the specific algorithm in use will be required to thoroughly clean up and analyze the images.
Niosus all those people that see artificial alien structures on other planets (because they are looking at compressed images) are going to have a field day
wolpertinger Yeah... Ah well, they see that on Moon images as well, after they copied a low-res JPEG thumbnail off some website and blew up the contrast, brightness, levels and whatever slider they could find. And if they can't find anything, it's because it is air-brushed!
"Evidence" for the conspiracy supports it, evidence against the conspiracy also proves that there's a conspiracy. There's no point in giving them any attention at all.
Niosus The problem is that "Media" is giving them attention, and that people without scientific-thinking are buying into those false believes.
Niosus AFAIK, NASA generally uses VQ based image compression (loosely similar to texture compression on the PC), and then further compresses this with an LZ77 variant (LZO), which is loosely comparable to Deflate (just is a little computationally simpler due to not using Huffman coding).
Brendan Bohannon According to Stuart Robbins, one of the scientists working with New Horizon's data (mostly focused on craters) and also a podcaster, they use JPEG for (at least some of) the images. He posted a while back that there was something that looked very much like a crater but turned out to be a JPEG artifact. Obviously I didn't know this when I posted my initial comment. If you want, I can try to dig up his post for the sake of providing a source?
However this is just the first batch of images. If I recall it correctly, it will take over 2 years to transmit back all the data in its full glory. As long as you know the downsides of JPEG, there are a lot of things you can still learn from those images. The finer details will come to light when the scientists get their hand on the full resolution/quality images.
Another area where i find that JPEG falls short is in technical drawings, such as electronic circuit diagrams. I am an electronics hobbyist, and therefore often consult datasheets of various ICs, but i find that many, especially older, datasheets are often difficult to decipher due to artifacts.
Just my two cents.
basically everything made out of lines and flat colors
You use PNG for those things
Honestly things like technical drawings and text probably are better stored in vector formats like svg or pdf.
@@DripDripDrip69 I use black and white TIFF files mainly since there is often no colour info required
@@phinix250 PNG can be 8 bit or 16 bit grayscale. TIFF have different compression methods, some lossless some lossy.
I usually don't have an issue picking up on stuff as I watch an informational video, but there's so many technical details in this, that I need to go watch that "how a jpeg works" video, and come back to this. I love it though. Learning the in depth details about something makes me feel like I actually know how it works. I always need to know the how and the why down to the smallest detail before I'm satisfied. This channel makes me research so much, and like I said before, I love it.
ok?
ok?
He mentions text, but this applies to anything that's not a photograph, basically. Drawings and animation are the same, it's the sharp lines you want to preserve, not the general swaths of colour.
People shoot in RAW not because of end result as-is, but because of the data in the image that can be used to edit the photo.
Ah, similar to why mastering uses high bit-depth audio, then?
TazeTSchnitzel Exactly.
Toni Lähdekorpi And often you can fully re-expose the image in photoshop or similar if you have all the raw data.
It's still a bad idea to not use JPEG or WebP if you want to share the final versions of your photos on the web, since they are only meant for viewing.
It seems we are in agreement. If you want to be able to do post processing on an image capture RAW. Afterwards, for the love of bandwidth, save the final as something else.
JPEG is the reason why some people believe in Aliens on earth.
***** And you throw the most overwhelming fallacies I've ever heard of thus far.
+Joaquin D (Joax) dude, HOW. you cant just read 1 sentence and claim that that guy is the reason why people dont believe in the future of humanity. come on. infact, how could anyone not believe in the awesome future of humanity? humans have been getting better and greater for a long time. they can literally only get better.
And you call yourself "Enlightenment"
change your name, or it will be changed for you.
+Daniel Cannata top kek
+Enlightenment
Lots of angry Aliens Guys in the comments. Amusing.
The term for those artifacts is “mosquitoing”. They are the image equivalent of “ringing” in digital audio.
I prefer using .png most of the times for small images the file size is smaller, and the image quality is better. I'm not sure at what size .jpeg files become less file size than .png, but .png works for my purpose.
Unless you are using a pointless level of compression, JPEG should always be smaller than PNG.
I did a file size comparison at a set of bars (which represent a flag).
In this case, PNG was the smallest.
@@Folopolis Not for really small images because PNG can compress those well and JPEG probably has overhead from storing the things needed for the compression to work
@@circuit10 in my experience, PNG is only better than JPG at sizes of like, 50x50 or 100x100. Anything higher, and JPG wins out almost all the time for all practical purposes. Like, of you're gonna use PNG at 500x500, you might as well just use JPG at 100% compression, and you'll likely still get a smaller file size.
Of course this doesn't count if the image is mostly text and/or dealing with low colors like clip art and rasterized vector graphics.
It's not so much about the size but how much of the image is blocks of one colour that decide whether a .png will be a smaller file than a .jpg. Generally .png is always a smaller file for things like screenshots of computer programs or web pages.
You can easily try this out by saving a screenshot of these UA-cam comments as .jpeg and .png - so much of the image is single colour background that the png should be a much smaller file and would have no loss in quality because (I think) it's lossless.
We want more videos with Mike! Those videos about graphics are just awesome!!!
Around about 1990, back when hard drives were a lot smaller and people still used floppies a lot, JPEG was an absolute revelation. The idea that you could take a photorealistic image and reduce the file size by a factor of 10 with no perceptible difference in image quality was stunning.
When I first started working in film, I was actually surprised when I found out the extent to which they used JPEG for pretty much anything that didn't have to be HDR, which I presumed at the time to be too artifact-ridden to be of any use. That said, it wasn't standard "web" JPEG. It was generally 16-bit-per-channel, and mapped to Rec.2020 or DCI-P3 gamut rather than sRGB. The idea with 16-bits per channel was based on the hope that the quantization errors like those described in the video would be reduced to such a small order of magnitude that they'd not be noticeable, and you'd anyway be mixing this with all nature of modifiers to the extent that errors like that would get lost in the mix.
That said, it's not as if we used high degrees of compression either, but JPEG at 98% quality is still significantly smaller than anything lossless, so that was the real point. Counts for a lot when you've got several hundred GB of data shuffling about for a single 20-second shot.
ok?
Nearly everyone has forgotten about variable jpeg compression within the same image. You can apply different levels of compression to different parts of the image - selective optimization.
Is it possible to learn this power?
Does that mean that it is possible for a jpeg to get progressively worse?
Do modern programs use jpeg in this optimized way?
@@bluesailormercury I know Photoshop allowed this in the past, but you had to manually set the mask and pick compression values. I haven't heard of any current software that does this. Also, yes, in theory you could have areas with 100% and 0% quality in the same image. I don't think it worked like a gradient though, you just maksked areas that should have used less compression and that was it.
Do I look like I know what a jpeg is?
Fair enough
No. No, you don't. :P
i just wanted a picture of a damn hotdog!
@@sonicbro6446 lol
As an astronomer I have to interject here. I run an imaging camera onboard a telescope and all our files are in the FITS format architecture. We need to retain the exact photon values for each pixel in order to be able to accurately measure stellar photometry, spectra (via grism), and to look for any artifacts. JPEG would completely compress this data making it completely poor for real science. Plus the issue of going from high luminosity to low luminosity would be a major issue with JPG given that stars basically go from thousands or even tens of thousands of photon counts to effectively 0 for space. Cosmic rays are even worse than that because they're not gradual like stars are with their 2D gaussian like profiles.
Astronomy is an example of extremely wide dynamic range data (there are others, like audio and data from seismometers). Technically JPEG doesn't even solve the photography problem, as it assumes that images are "flat" to eight bit, already. That's nowhere close to the actual dynamic range of typical terrestrial scenes, either. It's a file format that needs to disappear. It is obsolete now that we have sensors capable of 16 bit of dynamic range and more.
@@schmetterling4477 I agree JPEG and sRGB need to die already. Also the abysmal state of color management across the devices. We should have had HDR displays 10 years ago. Considering the colossal importance of imaging the improvements are made at a glacial pace.
@@markoposavec9240 Absolutely. Let's hope that image data handling will finally catch up with physics now that the displays (almost) have.
The whole "shooting in RAW" thing is like this: During the entire production chain of a photograph, you want to keep as much information as possible. Only during the final step, publishing, it makes sense to publish as JFIF to get some "workable" file sizes.
Same for any other industry (video, music, etc...)
Well the biggest issue that raw solves isn’t the lack of the ringing artifacts (say if you photograph text) it’s more for preserving color and luminance. And when color grading video or white balancing a photograph if you’ve run it through a lossy block compression the color cast you are trying to correct out has been altered randomly per block due to the compression. Best way to look at this is to take a jpeg and look at the color histogram after compression and you see these spikes which is where the algorithm has crushed the colors into bands.
I've been loving this series. I'm hoping we get to see something about PNG compression sometime.
My choice of formats are: eps for line art, png for schematic diagrams, and jpg for photographic images.
.svg files are better for line art.
@@ShankarSivarajan eps doesn't support transparency AFAIK
.EPS doesn't support transparency, I'm afraid.
My own choice is...
SVG for line art.
PNG for schematic diagrams
JPG for photographs
SVG for line art, webp for schematic diagrams, and webp for photographic images
My preference:
HEIC for nothing
JPEG for everything else
Oh and pdf for text 😁
After all these years of being troubled by the appearance of speckles, this Computerphile upload helps me to better understand their presence. When making a collage where some of the images used had text with speckles, it added to the time needed to make the collage. Cleaning up the speckles is such a chore.
that dude changed for good. i havent seen the old videos for a while.
I've found this series about JPEG compression extremely fascinating and enlightening - thanks for putting them together!
ok?
After 8 years. Still one of the best Videos to JPEG Compression
This series is awesome !! MOAR of this please !!
1:41, are the 51s and 55s supposed to be 151s and 155s? just caught my eye lol
No but in hindsight I think my 8x8 logo was slightly differently cropped than Mike's hence the numbers not quite matching up - good spot tho!
Knigh7z Actually, none of the numbers correlate with the colors.
I see, thanks
+Computerphile Could you do a video discussing techniques for interpolation in general, covering the different methods and algorithms used to accomplish it?
Mike Pound is awesome, more of him please!
Hey! I'm really interested in the JPEG image compression and am conducting my own research as a high school student on the same. I am not very proffiicient in coding but I want to explore this using mainly mathematics. I am having difficulty finding code or libraries that I can use reliably to get values like yours in the videos. I would really appreciate if you could share that. Thank you!
The difference between JPEG and RAW is *more* than just compression, it also loses additional sensor data that makes JPEG images harder to edit after the fact. It is extremely difficult to fix JPEG white balance in post for example, but it is very simple to do with RAW.
Is it possible to make a different quantization table for text-heavy images that minimizes these artifacts?
yes.
Theoretically yes, but said quantization table might not be as generally applicable.
Or you could just use png for that kind of image
This guy is great, more of him!
Do WebP next.
Why do image and video compression treat red text even worse than other text?
+tankermottind It's not just red text. It's very common to downsample the color information to half or a quarter of the pixels in the original image because humans have poor color vision compared to their ability to differentiate intensity so colored text will have been screwed up a bit even before the normal compression takes place.
In any case, jpeg and mpeg was designed to compress natural images, not artificial ones containing fonts that are one pixel wide.
Gnomefro
I just know that in video footage of FreeSpace 2, HUD graphics and text in red are always harder to read than any other color (green usually being the easiest).
What an amazing series! Thank you Ive always wanted to figure out how that works and now I have a much better idea. The guys that came up with these compression methods are genius!
false.
false.
@@Triantalex what is false
I still credit JPEG for speeding up the early internet. Anybody still remember BMPs/GIFs as the common format on early internet? It used to take a few MINUTES to render a picture. Let that sink in a bit.....
Why is the sink at my door again?
@@lemonke8132 You gotta let it in bro. Let that sink in…
@@VenetinOfficial this is starting to go down the drain
ok?
When I saw the title, I thought you will discuss blocking and lack of "overlap" in the transform to counter it, as described in, "Applying the MDCT to Image Compression" or the upcoming Daala standard.
Why does it screw up a solid white bitmap? Surely that should just be 100% wave 1 and decompress back to solid white but it comes out as different shades of grey and beige.
smegskull If it's _really_ just a single color in a block, it _will_ preserve that with just the DC coefficient (though the exact color might vary due to colorspace conversion). The problem comes when you have sharp details within the same block. Then you have waves that cover the entire block, and compression that gets rid of some of the waves that would cancel where the solid color should be.
Daniel Dawson It doesn't though. I get it when I use paint all the time If I save as a bit map and use the paint fill it fills everything but If I do it with a jpeg I end up with clouds everywhere because huge chunks of white are now just off white.
I'd say that's a problem with the software, then, or there's something you're not understanding somewhere. I just tested it with GIMP, an open-source application along the lines of Photoshop. Created a small solid pure white image, saved it as JPEG, *minimum possible quality setting*, unoptimized, etc. Opened it back up. It's still a perfect solid pure white. Conclusion: JPEG has no problem with solid-colored blocks.
My advice: try something other than MS Paint (if that's what you were referring to). It's not known for being great graphics software anyway.
Daniel Dawson "try something other than MS Paint. It's not known for being great graphics software anyway."
You Sire, win the Understatement of the Week Award!
Wouldn't it be smarter to use a format that incorporates RLE + LZW in that situation anyway? You are crashing a car in the wall, then yelling at the engineer because you didn't understand how a steering wheel works.
That was great! Those artefacts have always driven me nuts, and now I know why!
Please do a series on mp3 or other audio compression methods!
This is probably my favorite channel on youtube.
As an artist and graphic design specialist, I often use formats as PNG, however JPEG is still awesome and I use it for various purposes. Depending on compression, final images do look absolutely awesome in it. But it really comes down to image content, if it even makes sense to be used. A lot of details (like in photos) make JPEG relevant, but if there is a lot of plain coloring, PNG usually makes a lot more sense, because PNG always retains original, uncompressed colors, but still can be compressed and so images with big areas of same coloring can even be smaller in file size than JPEG. Both formats were first released in the 90s. For that, they are still highly relevant and awesome.
With images like these, JPEG files sometimes end up being way larger than what would've been the size of a PNG, bitmap, or path format.
Re-encoding doesn't result in generation loss? In theory yes, but in consumer software it actually does get worse after hundreds of saves. Is this because the quantization table changes for each save, or is the quantization table static and there's another reason?
fantastic video series, thanks very much for making it.
I like this series. More from Mike, please.
I never use jpeg, switched to PNG and really happy with the quality. My camera, like most does use jpeg compression, but I also have RAW which can be compressed later, so RAW is the way to go.
True if you are serious about photography you really should shoot RAW, the ability to change image processing parameters after capture is to valuable to pass. Even considering the logistical problems with RAW.
It's worth pointing out that even at minimum compression, as in, you don't low pass filter the DCT values at all, the output image still isn't exactly the same as the input. Its very close, but not the same.
As others have pointed out, shooting in Raw is done for greater flexibility when it comes to editing images. It would be great if you could do a video explaining the processes behind adjustments like brightness, white balance, etc. Then maybe talk about the advantages of higher bit images, sounds, or other information when it comes to adjustments. There is a huge practical advantage to editing 12 bit files as opposed to 8 bit JPEG images.
Come to think of it, is the greater flexibility due to the lack of JPEG processing, the greater bit length of Raw files, or both? Another good video idea...
You should link the video which describes the 300dpi problem as a comparison to this one. The concepts are quite similar.
There is another problem with JPEG, and that is if you push the compression too hard even on images without sharp edges in them, it ends up looking blocky.
There is another compression technique, known as “JPEG-2000”, that uses wavelets instead of DCT. Here when you push things too hard, it gets fuzzy rather than blocky, which many people feel is less objectionable.
Why don't they check the euclidean-distance between the original image and the quantized image? If it's to high, they could decide to store that block uncompressed or try a different quantization matrix...
Paradoxic definition points: 1. Did JPEG'ers not-understand that they were to remove, high-frequency artifacts, not just not-compute them... 2. GIF'ers had a similar trouble with pixel-quantum-level speckles that realistically indicated lower-frequency threshold-crossing....
But if you use a reasonable high quality factor(low compression) then you end up having a non-visible loss of quality while at the same time a better compression than e.g. png. We testet this ourself with a lot of documents, and on mobile it is just not worth sending a 4mb(or even more) png, whereas an image with jpg is only 600kb or so and looks really the same (you don't see any difference even on a pixel basis)
How about compressing areas in different rates? For example. Mostly of the image would be compressed with 90%, but the text area would be compressed with 10%
Xano Trevisan Kothe Modern image compression formats support features just like that.
Xano Trevisan Kothe wavelet compression
Mike Johnson wavelet? I did a project using it(Wavelet algorithm 1-D, 2-D, and 3-D). And I was not satisfied with the result.
Xano Trevisan Kothe The problem is, how do you know where the text is? All you have is low and high frequency data. High frequency data might indicate text, or it might just indicate random noise which can be thrown away with no perceptible loss of quality.
You could do the DCT for each block, then, then see whether each block is mainly high or low frequency content, create a low resolution mask for the entire image and use two different weights depending on if its a high frequency or low frequency area
It sounds like JPEG should have been built to detect these high-frequency blocks and just give up and leave them uncompressed
alternatively jpeg could have had a process to subdivide blocks that are particularly busy into smaller ones, compressing the blotchy and underutilized expanses of color and space around the busy regions, however this would have only mitigated the problem of the blocky artifacts, rather than completely eliminate them. Granted ideally the blocks would be much smaller
@@Gogglesofkrome that would also work
Would it be possible to create a Huffman table that is optimized for these sharp changes? Or at least one that is better for text, without having as large a file than if you just used super high quality?
Why not just programmatically determine the quantization table to use, based on the cosine waves that are most / least common in the image?
Because the file keeps the table, I don't see any reason to use a static quantization table for all images, other than that it would make compression faster (and it's usually "good enough").
jpeg was made specifically for photographs, for other images png is superior as it has powerful lossless compression.
1:00 “High frequencies” i.e. image-processing-speak for “sharp edges”.
Is there another image compression format that works better with sharp color changes as seen with text and similar images or does image compression in general have problems with this?
Please, make a video about JPEG2000, it is largely unknown but interesting technology.
And a video about webP
i found best way to deal with speckle , is add a shadow behind text that is grey to transparent to background , and never use red text on blue
Is it possible to use an adaptive matrix? Setting to 0 the ones which will cause the smallest overall changes in the values? Would the way to do that just be to remove the smallest values?
I trying to avoid using jpeg but my storage was like "no. don't you ever try to think about it"
Seems to me that jpeg is best for fast loading pictures on web pages.
When you transfer a JPEG file (either by Sending to another Hard drive or Copy & Pasting) eg backing up photos to second Hard Drive, is there a loss of Image Quality on each successive transfer of the JPEG file or does it remain as the original JPEG quality?
+Kris Vette No, a copy paste operation is an exact bit copy of the file, as in, it streams the file from disk into memory and then saves that stream to wherever you pasted it to, without changing anything about the files contents.
You can copy a copy of a copy to the nth degree and the last one will be exactly the same as the first. :)
This is why I use PNG
Faissal Bensefia PNG has its place, but isn't great for everything. PNG-8 is similar to GIF, but it can store a single alpha channel. Unfortunately it can only store 256 colours which makes it bad for photographs. PNG-24 is fantastic because it can store thousands of colours including multiple alpha channels, but it will be a much larger file size compared to JPEG (like 5X), and won't be noticeably better quality then JPEG.
So you shouldn't always be using PNG or JPEG. You need to switch the file type depending what the image is, and how you intend on using it.
BeatleFloydZeppelin I use PNG 24 with 0 compression as long as there's no file limit because I hate how much of a degradation in quality JPEG causes
*****
Not sure if sarcasm
ﺟ_ﺟ
or serious
Faissal Bensefia for screenshots
Faissal Bensefia if you have so much text just put it in text document, or use JPEG in normal resolution.
I'd propose a hybrid type or a newer version of jpeg that supports non-compressed regions that a user with an editor could select text areas to exclude compression in the particular locations.
Can't they do a sobel or other edge detection algorithm and whenever there is an edge they use higher quality compression, or max quality?
If i use jpeg image for a digital image processing will the lossy compression effect my results??? What about bmp, will it effect it??
What I wouldn't give for a hybrid between JPEG style compression methods and a second "layer" with rendered text. Changes are it would be smaller than a lossless format anyway.
Mansen EPS can do this. It can include an arbitrary mixture of raster graphics with JPEG compression and vector graphics and is still primarily an image format (so it's embeddable), not a full document.
Mansen why not just save in near-lossless format then?
Scoldpedia Because you lose the sharpness of text when you rasterize it.
Mansen For that you'd need OCR to read the text from the image and inpainting to calculate what's behind the text. But these technologies are currently neither completely accurate nor fully automated. I think a format like that would require AI and computing power that we don't have yet. But maybe in a few years.
yondaime500 Uh... no you don't.
OCR is reading text FROM an existing image. I am talking about the original production of said image with text separate from raster layers... As Totoritko mentions, EPS can do this - So can "workspace" formats like PSD, but those are far too heavy to share, and won't show in browsers anyway.
Something I noticed that wasn't really mentioned was that the colored text looks much worse than the black and white text. I'm guessing that's because of what you said earlier that the chrominance gets compressed even more strongly than the luminance. So red text especially looks very washed out.
I've noticed that before on other compressed things, red text on video often looks awful. I'm guessing it's essentially the same thing, if you don't expect small changes in luminance, you certainly don't expect small high frequency changes in chrominance.
I never quite knew why that was, just that it was annoying.
RAW usually has between 12 to 16 bits per color (14 being most common) vs 8 bits for JPEG. You might not be able to see it straight out of the camera but in editing you can pull out details in highlights and shadows. So for any serious editing, you'd be better off with RAW.
I wonder what format New Horizons used for the Pluto images?
The best way to fix this problem is to use PNG
Yeah. Sorry jpeg, everyone hates you.
+Some Person JBIG2
nah gif is better than the rest.
*sarcasm*
Pff I use .ico for all my images
but thats desktop icons.
i use .acur for my animations
JEPEG also has that artifacting when scanning drawings, worse if you drew with ink or a darker lead.
What if you essentially reversed the process? told the jpeg compressor to compress the low frequencies, and keep the high frequencies?
What if you implemented a two pass compression system, whereby if an output image differs substantially from the original than you change the coefficients in that area and then re compress the original image?
I guess I see that you've just shown that there is a way to exactly measure the quality of the output, it would seem like the compressor could use that information to produce a better overall image
Thank You Daniel Dawson and theguycalledchris. I can see now how reversing would be a problem.
I do use PNG for most everything, but I would like to see JPEG improve to reap the benefit of a lossy compression while improving image quality.
What if for the two pass compression you introduce 2 to 5 coefficient tables. Each table would be determined by the results of the 1st pass. This should, I would think, add only a little extra overhead.
veggiet2009
That's more reasonable, yeah. The tricky part will be figuring out an optimal set of tables (BTW, they're called quantization tables, because the coefficients get quantized by being scaled down; most of the compression in DCT applications comes from quantization) and maybe when to apply each one. The latter could probably be achieved by simple trial and error.
would have been nice to see a comparison with SVG & PNG
So what you're saying is my porn could be in much higher quality?
Dee Jay Only if it's interracial.
hristaki99 Hahaha! You win today's Internet.
hristaki99 Not sure if racist or awesome. -.-
hristaki99 rofl I cried laughing so hard
Suvi-Tuuli Allan In the video he explained that artifacts are caused by sharp change in colour between pixels. nuff said
This video is so helpful regarding ICT fundamental principle.
Where can I learn about coding to make JPEG or BMP images?
This is so great! Thank you very much for making these videos!
I shoot raw, save in raw, unless I need to upload it some where. Storage space is cheap so that not really an issue. 14 bit raw image gives post processing a lot more flexibility, 32 bit HDR stored in DNG can be a bit of a drag though
If you find you save a lot of images in raw that you never or rarely look at, what you could do if you ever need to save more space is put them in a compressed archive, say .zip or .tar.gz, and then extract when needed or use an image viewer that supports viewing images in compressed archives whenever you need to look at them.
James Rolfe from Cinemassacre and Ian Ferguson from CUPodcast had a British baby and it’s this guy
In the interest of global bandwidth reduction, it may be worth changing our alphabet to include surrounding JPEG artefacts in its letters. Thoughts?
Brilliant idea
You can't shoot in jpeg, you're camera always shoot in RAW. Then it can convert it to jpeg. But doing so it makes decisions about white balance, colour balance, added sharpness, enhanced contrast and more. That's why we shoot in RAW, to let us decide how the final image will look and not let the camera decide.
Can you do videos on vector graphics at some point? These were awesome.
A big downside to JPEG is that it doesn't take alpha into account like PNG does. So then you're stuck with just rectangles. Which is fine is some cases, but with lots of graphical design things, it's not.
Oh for sure. If you are working with Photoshop, for example, you definitely don't want JPEG source images in your project. JPEG has limited relevance these days (it was mostly useful back in the day when transmission bandwidth was low/expensive) other than it's usefulness as a part of MPEG/MP4 etc compression.
»Most people swear by shooting in raw and good luck to them?« What does he mean? Seemed like he was scoffing.
The reason for shooting in raw is, that you get the actual uncompressed "raw" data from the CMOS sensor of the camera. Which is brilliant if you want to do any kind of post processing with the image. Colour corrections, contrast etc, or even more elaborate manipulation. You don't want to lose information before you've done that.
It always depends on what you want to do with the file. If you are a photographer or a graphics artist who wants to do some post processing and image manipulation: get the image as clean as you can, don't lose any information you may later need -> lossless!
If you want to archive the image long term, then some lossless format may be a good idea as well. It depends a bit on storage cost.
If you want to distribute the image for display on the web, then save bandwidth, compress the image and use jpeg. (although png seems like the better choice to me)
Bottom line: Shoot in raw if possible, process the image, then convert to other file formats for archive/distribution.
frustbox He was probably just trying not to offend anyone that actually uses JPEG, there is a few people left still using it that defend it as much as possible despite their arguments being about as valid as a creationists.
oBLACKIECHANoo Oh, well, yes, that's one way to look at it. I'm going to re-calibrate my sarcasm detector. ;)
Heh, I may have been scoffing a little! I should probably have explained it better. I have no issue with shooting in raw then converting later. However, I do disagree with those claim that anyone shooting in Jpeg is inherently bad at photography. There are obvious benefits to both approaches.
magottyk Ye, RAW is just undeniably better quality and far more flexible. The only time you would sacrifice that is for the burst mode and not having to edit, which is only useful for time sensitive reporting, like sports. However if somebody is shooting weddings on JPEG they are a horrible photographer, jpeg by default makes their hit rate and final product worse and they aren't providing the service they should be.
oBLACKIECHANoo
I'd sack any photographer who couldn't provide me with the raw images on request.
Considering that today we have uhdtvs with a resolution of 3840x2160 which is about 8 mega pixel equivalent and not in the same aspect ratio as cameras (you'd want at least a 12 MP cropped image to suite 1:1), with the next gen standard to be double that again which equates to 32MP and again a different aspect ratio. Those displays will show up all the flaws of JPEG. and yes I can see the boxing artifacts of JPEG and I've got crappy eyesight.
Where once we were constrained by technology, that is no longer the case. If you're paying for the images from a professional, then they have no excuse to be shooting in JPEG only. Consideration can be given to any continuous shooting sequence as that is still constrained by technology.
If the image has small text in it, just use the mildest JPG compression setting. What is the big deal? It works fine.
Can we have compression by doing reverse for text. Remove low frequency and keep high frequency.
That's a really interesting concept. I wonder if or how that would work.
For text, why not invert it and assume no low frequency and only high?
You should make a video about MPEG!
Is jpeg noise just the image equivalent of the nyquist limit
I can't wait for AVIF support to become as common as jpeg. It blows both jpeg and WebP out of the water in quality/size, and it also supports 10 and 12-bit images. (imo the fact that almost everything is still on 8bpc is one of the most ignored shortcomings of modern image compression systems.)
Very interesting. I never knew that jpeg does to visual data the same thing "telephone" codecs do to voice.
This would be so much better with a link to the actual algorithm, to something the shows the actual math involved in the compression. I'm sure its complicated, but as is its like hearing about variable in an equation without seeing the equation, so it comes across as what everyone already knows with restated in jargon most do not.
"Lots of people swear by swearing in raw," like yours truly :P
How to get those values?
Render text from source... Yikes how many cores does that take?
I actually created a Python script that uses OCR to detect text and create a kind of mask for relevant blocks. It then saves this mask out at a separate compression than the rest of the image. Not sure why users don't at least have an option for this in 2024 now. Obviously lossless exists but yknow.
Cool. Two decades ago I decided to use .gifs for text/title graphics and jpegs for photos/artwork just by the way they looked. And this was the reason. Nice to know.
So I use mc paint for my art and it was driving me insain that for the last few years if I had text I had one save because of the artifacts messing with it after was impossible...now I know why ...thank you so much
It's crushing to change a background color and find the text is surrounded by negligibly different pixel fur. One (imperfect) approach is to reduce the colors, even to monochrome.