jpeg or png let me share with you something that's going to blow your mind have a look at this so here we have a solid color adjustment layer in gray and on top of that we have a radial gradient i'm not sure how youtube is going to compress it but there is some banding but then again this is a very high quality image we're going to get back to that later but for right now just look at this now we're gonna save a copy of this in jpeg and png so let's do that by going to file save a copy and let's save a jpeg version all right grayscale copy dot jpg let's keep the quality maximum and hit ok similarly.
let's go to file save a copy again and this time let's save it in png there you go let's save it and again we'll save a large file size and hit ok now let's open both of these versions jpeg and png in photoshop and see what happens so let's drag it and drop it at the top both are separate documents so now we are working with jpeg right and if we create a curves adjustment layer see what happens so i'm going to make the brights brighter just like this and the darks darker as you can see the branding sorry banding exaggerates exaggerate i don't know how to pronounce it i think it exaggerates anyway have a look it's so clear and there's so much banning in it however if you copy the same curves adjustment layer by selecting this adjustment layer and pressing ctrl or command c to copy it and let's come back to the png version and then you paste it have a look at it my friend see does that mean jpeg is bad does that mean that you should always use png well that's what the video is all about in this video we're going to talk about the pros and cons of both jpeg and png when to use what why all of this is happening and many other interesting concepts at the end i have a bonus surprise for you so without any further ado let's get started by the way that bonus might be a little boring but it's very important [Music] back in the mystical mysterious magical and brilliant world of photoshop if you want to go ahead and download any of the photos or assets to follow along everything is downloadable by using the link in the description now first of all let's talk about the size and image quality let's start by analyzing illustrations or flat graphics not real photographs by flat graphics or illustration i mean the photos where you can count the number of colors for instance have a look at this illustration you can count there is brown there is yellow there is white so you can count the number of colors in a real photograph it's just impossible they're like 16 million colors so let's understand how the size and image quality comes into play in these kinds of flat illustrations or graphics now when we go to file export export as i'm choosing this so that we can clearly see the difference between the size first of all let's choose png now let's zoom in about 800 so that you can clearly see what is happening in there now with png every color seems to be in order everything seems to be in place.
we have zoomed in 800 and then we are seeing some pixels along the edge there's no artifacts so this image quality is just perfect keep in mind png is lost less it does not lose quality as you export it jpeg is lossy so have a look at the size it's 567.2 kb now if you choose jpeg and that too of the highest quality right there here as well you don't see much problems no artifacts and everything just seems to be in order however if you look at the size it's just double right 1.1 mb right there now if we try to match the size to what the png was see what happens so i'm just going to decrease the quality to about very good size is about the same and as soon as you do that have a look at the plethora of artifacts right there even if you go with excellent which is a little higher size 633 you still see these artifacts now with jpeg even with great you might see some artifacts here and there if you look closely right now let's cancel it and let me show you one more example but with png be assured that there's going to be none because it is lossless all right let's see this example this is as you know pixel perfect logo and let's go to file export and export as now some of you are wondering why should i use export as or when should i use save as or save a copy and whatnot we have videos about that you can check that up in the description with png have a look at the size it's 70 kb and with jpeg have a look at the greatest size it's 167. it's just more than double right here and there's of course the chance of losing details as it is lossy now let's go to png back again and in this image we don't need transparency so if you just check that off have a look the size even decreases now it's three times smaller than jpeg by now we have confirmed that in graphics where you can just count the number of colors in those cases png's hands down better but what about photographs like real photographs and in this case i've chosen this photograph purposefully because first of all it has a lot of colors it's a real photograph and it will be interesting to see how png handles it so let's go to file export export as now if we try to save it in png have a look it's still processing it's taking time and have a look at the size my friend it's 28.6 mb it's not even that big of an image now let's zoom in and let's focus on an area now keep in mind there's no problem with image quality it's just the size is crazy now let's try jpeg right now it is that good let's keep it at the best quality right here and just have a look at the size it is 9.5 that one was 28 like three times wow in images like this jpeg wins now you might be wondering there's an option for a smaller size with png right why can't we choose that well if you go back to png there's an option for a smaller file if you click on that see what happens see it's still processing we're going to have to wait for that so if we check that still processing
Now have a look at the colors it's finally done it is just absolutely unworkable and the interesting part here is that even with the smaller file the size is just as same as the highest quality jpeg now when it comes to flat graphics even if you check smaller file you won't notice any of it unless you have like super complex colors zoom in you won't notice any of it and the size goes even lower so it's like 180 if you choose jpeg highest quality it's going to be 1.1 see the difference 180 kb 1.1 mb right now if you're feeling confused don't worry we got you covered we're going to sum it up later but for right now let's move on to the next topic and that is banding and bits remember this document that i showed you in the beginning of the video just as a reminder we have a solid color adjustment layer and on top of that we just have a simple radial gradient now here's an interesting fact that i didn't show you before and that is if you go to image mode you would notice that this document is 16 bits per channel now if i go ahead and create a curves adjustment layer and if i try to do anything like increase the contrast have a look you don't see any banding right here however if i do this with an 8 bit document let's go to image mode and let's change this to 8 bits and now when you do it you would notice a lot of banding the more you increase the contrast the more clearly defined these bandings get it almost looks like a design so that is why i recommend working in 16 bits

If you have any doubts, Please let me know :)