JPG vs. JPEG vs PNG photo formats


I know there are different photo formats but what do they all mean and how do they effect pictures?

In: Other

They are compression formats. They are used to lower the quality of the picture to save the space needed to store it. Some formats have better, some have worse compression, and that’s why the same photo saved in different formats can look different or take up more space.

JPEG and PNG are both compressed image formats, meaning they will build an image that compresses the size of the original image into less information than the original. The difference between the two is that PNG uses a lossless compression algorithm, meaning the new compressed image is the same as the original, only smartly packed into a smaller file, while JPG uses a compression algorithm that can destroy some of the information in the original picture. With PNGs, there is a limit to how much you can compress the image without causing losses, but with JPGs, image files can be arbitrarily small, depending on how much loss you are comfortable with, making it specially good for online transmission, especially in the early days of slow data transfer speeds.

JPG and JPEG are the same thing. “JPG” is a shortened form of JPEG to fit the three-character file type extension limit (“foo.jpg”) that was common on older operating systems.

Others have covered how PNG is different.

just a quick note since others already said most of it: jpeg is jpg. Same thing. same compression algorithm. Just different abbreviation. It was a technical thing back in the day: file extensions were 3 characters long for windows. That’s the only reason jpg exists haha.

One of the big differences between JPG and PNG is that PNG has the ability to use a transparent background.

One aspect of my job is creating photorealistic rendering of our products for catalog, website and print usage. I render everything out at a 1800 x 1200 PNG. This equates to a 6″ x 4″ image if being used in a magazine or catalog. I use PNG because they have the transparent background which means no weird box around the image.

The biggest difference between the formats is the methods they use to compress images. Jpg & jpeg are actually both abbreviations for the same format, which uses lossy compression. Lossy compression is able to store the image with much less data, but loses some details & makes the image look noisier, but that usually isn’t noticeable unless the image was compressed with really low quality settings. Png uses lossless compression, which is able to still save a lot of space compared to raw image files, but can still be 5-10x larger than a jpg of the same image. Lossless compression, however, doesn’t cause any loss in image quality.

Png also allows a transparency channel, so any pixel can be partially or entirely transparent, where jpg doesn’t support this.

There’s also another mostly unused format, apng, which is essentially a gif with the same lossless compression & transparency as a png, which is a step up from gif’s 8-bit palettes.

Png images allow you to keep transparent parts of the image… Jpegs don’t really let you keep that information but they can be smaller file sizes, so…

**PNG:** A PNG is what’s called a “lossless,” compression format. It looks for repeated data and simplifies it to save space. A simplified example would be: **RED, RED, RED, RED, BLUE** -> becomes -> **REDx4, BLUE**. The data you put in will always be the exact data that comes out but the file sizes will be larger than JPG/JPEG for reasons I list below, mainly because *exact* colors don’t tend to repeat too frequently outside of graphic design, meaning they can’t compress as much.

**JPG/JPEG:** First off, JPG & JPEG are interchangeable and the same thing. They’re what’s called a “lossy,” compression format. Basically they try to throw away data that you won’t notice in order to save space EX: All the pixels in the blue sky are *close* to the same color, so instead of remembering **light blue, slightly lighter blue, slightly darker blue, blue, light blue, etc.** it just remembers **blue** for all of them and then runs a similar process to a PNG to compress it down further. This means the data you put in won’t be the same you get out, so you have to be careful since if you save a JPG, then edit and save it again, you have just compressed it twice and will start to lose a LOT of quality.

If working in a production environment (video/photo editing, graphic design, etc.) it’s best to keep your files in a **lossless** format until the very end, or you risk the quality degrading with every step. If you’re final product is meant to be re-used (for example a logo or a video-intro meant to be re-edited into a larger work) *always* deliver the final product in a lossless format.

To add to the previous comments…

The compression used in JPEG, although lossy, will not result in any noticeable issues for most photographs of normal scenes in the real world, where there are lots of different colours used in every part of the image. The loss of information caused by the compression process shows up in “compression artefacts” in the image, but these will hardly be noticeable as long as a modest level of compression is used (this can be selected on the camera or when writing the JPEG) and as long as the process of re-compressing isn’t repeated multiple times.

For block graphics (e.g. logos) even modest levels of (lossy) compression result in artefacts that make the boundaries between blocks of colour messy. That makes PNG (with its lossless compression) a much better format for block graphics. Edit to add… PNG is also better for screen grabs, for the same reason (as long as the screen isn’t just showing a photo).

So I use irfanview, which has a sliderbar in the .jpg image save settings for quality. If I choose maximum quality is the save still lossy?