Image File Formats - JPEG, GIF, PNG
Techquickie
·Techquickie
·2018-05-06
·
1,235 words · ~6 min read
0:00
So, you've just finished working in your favorite image editing program and your
0:04
masterpiece is ready for the art gallery, your web design portfolio, or
0:08
even 4chan. But when you go to save it, you're presented with this baffling
0:12
array of file format options. TIFF, PNG,
0:16
BMP, and come on, why does Photoshop think you look like you know what a JPEG
0:21
is when all you want is a picture of a god hot dog? Well, to answer Hank Hill's
0:26
question, JPEG stands for Joint Photographic Experts Group. And despite
0:31
the fancy sounding name, you don't need to be an expert to use it as it's an
0:35
extremely common format in the world of photo storage. JPEGs are popular for a
0:40
number of reasons, but one of the biggest is that they save a lot of
0:44
storage space compared to older formats like BMP, which used to be widely used
0:49
due to its simplicity and compatibility across devices, but has since fallen out
0:53
of favor. Now, to achieve these space savings, JPEGs use what's called lossy
0:59
compression. So, when you save an image as a JPEG, some of that image data
1:03
actually gets discarded to reduce the file size. Now, the way that it does
1:08
this is it compares every 8 by8 block of pixels that make up the image to 64
1:13
standard patterns, then determines how much weight each of those 64 patterns
1:18
contributes to that block. Afterwards, the higher frequency or more
1:23
checkerboard like patterns you see to the lower right have their respective
1:27
weights lowered by an amount that depends on the JPEG quality setting as
1:31
your eyes aren't really all that good at seeing lots of brightness differences
1:35
over a small area. This means that often times these higher frequency patterns
1:39
end up contributing nothing to the compressed image, which is the main way
1:43
JPEG compression can reduce photos down to just around 10% of their uncompressed
1:48
file size with very little loss in perceptible quality. But there's a
1:52
catch. JPEG compression works best with photos because the detail in the photo
1:57
tends to hide compression artifacts. JPEG struggles with sharp edges and
2:02
curves you often find in non-photographic images such as diagrams
2:06
or design elements on web pages. For these, a much better format is the
2:11
graphics interchange format, commonly known as a GIF or GIF. Well, however you
2:18
pronounce it, GIFs use lossless compression, making them ideal for
2:22
simpler images like corporate logos because you won't end up with any of
2:25
those nasty artifacts that are easier to see in a clean, simple design. Gifts can
2:30
also, very notably, even be animated by
2:34
showing multiple images in rapid succession. But their huge drawback is
2:38
that they're only limited to 256 colors,
2:41
meaning they often appear grainy when used for more complex images. So then if
2:46
you want no loss in image quality without the huge file sizes, what do you
2:50
do? Well, this is where you might turn to the increasingly popular PNG format,
2:55
which stands for portable network graphics. Now, as the name suggests, it
2:59
was designed to be useful for sending images over the internet. Now, PNGs can
3:03
reduce the file sizes of graphics heavy images without introducing compression
3:07
artifacts the way JPEG and GIF can.
3:10
Though, the lossless compression means your file sizes will be larger. So, keep
3:14
this trade-off in mind. But it's not all about image quality versus file size.
3:18
PNG also supports transparency, meaning
3:22
image editors and web browsers can understand that certain areas of the
3:26
image are meant to be transparent, allowing more flexibility in how the
3:29
image is used. Of course, there are times when image quality is of paramount
3:34
importance, and you're not as concerned about file sizes, such as in
3:38
professional photography settings where TIFF is a popular format. Now, although
3:42
TIFF can use compression, it also supports uncompressed images as well as
3:47
many different color spaces and other options, making it popular among
3:50
photographers and printers. It's also increasingly common to run across images
3:55
into scalable vector graphics or SVG format, which can be resized as much as
4:00
you like with no loss in quality, meaning file sizes are usually very
4:04
small. And you can learn much more about vector graphics right up here. And
4:08
there's actually one important format that isn't really a format at all. RAW
4:12
images, which are also sometimes referred to as digital negatives. Now,
4:17
just like a negative from an old 35mm film camera, a raw file isn't an actual
4:22
picture, but it contains the information needed to create one. So, it's a very
4:27
lightly processed file that contains as much of the original information
4:31
captured by the camera sensor itself as possible. Raw files typically require
4:36
special codecs to open them on a desktop image editor. But raw images are favored
4:41
by photographers because having all of that original data opens up so many more
4:46
editing options such as more granular control over brightness and colors than
4:50
would otherwise be possible. Now, some raw formats, and they are not all the
4:54
same, even allow things like white balance or overexposure to be corrected
4:58
after the fact. Whoa. Then after editing, raw images can just be saved as
5:04
whatever format makes the most sense. So, I hope this video has made it a bit
5:08
clearer why there are so many different formats for something that seems as
5:12
simple as displaying images. And if it has, let us know if you'd like to see
5:15
future episodes that explain other kinds of file formats for things like audio
5:20
and video. Tunnel BearVPN lets you tunnel to 20
5:24
different countries, allowing you to browse the internet and use online
5:28
services as if you're in a different country. They have easy to use apps for
5:32
iOS, Android, PC, and Mac, and also a
5:35
Chrome extension. Just choose a country in the app, turn Tunnel Bear on, and
5:39
watch as your Bear tunnels your internet connection to your new location. When
5:43
you turn Tunnel Bear on, two things happen. First, your connection gets
5:47
encrypted with AES 256-bit encryption. and second, your public IP address gets
5:52
switched, so you can show up as you're in a different country. Tunnel Bear lets
5:56
you bypass all the annoying details that typically come with using a VPN for
5:59
personal use. There's no need to mess around with port configurations, DNS, or
6:04
any other router settings for that matter. Tunnel Bear handles all of that
6:08
in the background. They also have a top rated privacy policy, and they do not
6:12
log user activity. And now you can try out Tunnel BearVPN with 500 megabytes of
6:16
free data with no credit card required. And if you choose to get a year of
6:20
unlimited data, you can save 10% by going to tunnelbear.com/lininus.
6:25
So, thanks for watching, guys. Like this video if you like it. Dislike it if you thought it sucked. Leave a comment with
6:30
your suggestions for future videos. And check out our other channels. They're always doing something wild and crazy
6:35
over on Channel Super Fun. Whatever is playing above my face right now, I'm
6:38
sure that looks just fantastically entertaining. So, go check that out and
6:42
we'll see you guys next time.