PDA

View Full Version : File Formats



ricktas
21-05-2017, 8:57am
There are a vast array of file formats that digital images can be created in or converted to.

This thread is about identifying those formats and providing some detail about each format.


If you wish to add to this thread, please do so, but please keep to the following formatting

Extension - the file type use by files
Description - Describe the file type

So let's get started.

Probably the most common file type for digital images is:

JPG (sometimes called JPEG)

JPG (Joint Photographic Group) was developed as a way to compress image files for transmission digitally. The Joint Photographic Experts Group created the JPG standard in 1992.

JPG is a lossy format, meaning that data within the file is lost as it is saved in the JPG format. Once this data is lost from the file, it cannot be recovered. If you save a JPG file over and over, eventually as it loses data each time, you will start to see pixelation in the resultant image. This often appears as 'blockiness' in areas of single or similar colour (ie blue skies). JPG files are created in the sRGB colour-space. The benefits of JPG are their file-sizes. An image file can be saved into quite a small file size using JPG and have no obviously noticeable degradation of image quality, allowing the file to be easily transmitted digitally.

Having said this, some edits to JPG files do not result in loss of data. Rotating, cropping or flipping an image for instance.

Due to their lossy nature, JPG files are not the best files to perform edits on. You are best working on an image in another high quality and non-lossy file type and once editing is complete, then save a copy of the finished image as a JPG file.

Hawthy
25-05-2017, 6:36pm
Over to you, Arthur...[emoji3]


Sent from my iPad using Tapatalk

ameerat42
25-05-2017, 7:32pm
JPEG (and the format called GIF) are commonly used on the Internet (like here on AP) for space saving reasons.

Two important measures of any image format are its color and tonal ranges.
A JPEG image is an "8-bit", RGB image format. This means that it stores color information as three primary
colors (Red, Green, Blue) - also known as "color channels", and each channel can record 256 levels of
tonal brightness, from BLACK to WHITE. The "8-bit" refers to the power of 2 that yields 256, that is:
28 = 256.

A NOTE ON RAW Formats...
All camera sensors record the full spectrum of a natural image as a proprietary "raw" file. These files can
be 12-bit or 14-bit per color channel. Some cameras can only SAVE the sensor's raw image, after in-camera
conversion, as a JPEG or a TIFF (see elsewhere for TIFF). Such cameras are usually low-end Point-and-Shoots
and most phone cameras.

The conversion from "raw" to JPEG is usually done later by means of a "raw conversion program", such as
Canon's DPP, Nikon's ViewNX, Adobe's Lightroom, and a host of proprietary ones. The main way this happens
is to make a perceptually smooth compression of the information-rich raw file to a much smaller JPEG.

This involves turning typically 214 = 16384 different hues and tones to just 256. Mostly, it works
for "normally lit scenes", but in cases of extreme tonal range, unrecoverable highlights or shadows occur. Areas
of subtly changing tone/color are "blocked" into more restricted tones/colors...

...
...
and so on...

Hawthy
25-05-2017, 7:54pm
This is interesting. I have a basic understanding of the "lossiness" of JPEG. I would shoot in raw and then convert to .jpg. Then someone suggested to convert to .tif instead to .jpg. It is a much more tolerant format. Why does the .tif format retain more information than a .jpg?


Sent from my iPad using Tapatalk

ameerat42
25-05-2017, 8:26pm
There are two types of tiff (and two types of each of those): uncompressed and compressed.
The difference between the compression in TIFFs and JPEGs is that TIFF is lossless...

NOT a miracle, though! TIFF does not compress the same way nor as much (generally) as does JPEG.
But everything needs qualification. The two other types of TIFF are 8-bit and 16-bit. If you use 8-bit,
then PRESTO! You're doing the same as a JPEG: compressing lots of info into much smaller bit-space.

Ultimately, for reasons alluded to above, you eventually have to change to JPEG. That change itself
is not drastic, but the subsequent REDUCTION in size and quality for web-posting is.

The only reason you'd use TIFF is for intermediate working steps on your files. - But then I don't. It's
just raw to jpeg in 99% of cases. As soon as you move away from the original raw things change.
--But they have to, and the thing about PP (post-processing) is to manage the changes.

This will be the case until all web-based displays can (ever) show every type of file format (including raws)
ever invented.

Tannin
25-05-2017, 11:23pm
Technically, TIFF is a container format. You can stuff practically anything into a TIFF, and there are ... oh I don't know ... maybe 30 different formats commonly used inside TIFF files. TIFF compression can be lossy (just like a JPG). But in practice you can usually use TIFF just as Ameerat42 says in her excellent answer above and ignore the details.

Many people find TIFF a really useful file format. You start with a raw or JPG, process it as you desire, then save the result as a lossless TIFF. Then you can come back to that file some other time and create whatever you want from it with no loss of quality. (For example, a different crop, a resize for printing.) Much easier and more flexible than the huge, cumbersome proprietary formats programs like Photoshop tend to push you into. For starters, you can open a TIFF with practically any image viewer ever invented. Note, however, that you are saving the processed IMAGE, not the WORKFLOW that led to it. If you expect to want to (e.g.) step back your PP part-way and take it in a different direction from (say) steps 5 through 9, keeping the chages you made in steps 1-4, PSD format may be a better choice.

My view is that it is better to save in TIFF format (for the reasons mentioned above), and on those rare ocassions when I want to reprocess early stages of the PP (from before the TIFF creation), just open the original raw file and start over. (Photoshop helpfully remembers my previous raw conversion settings and offers to apply them if I wish, which is a nice touch.)

ameerat42
26-05-2017, 4:10pm
Technically,... just as Ameerat42 says in her excellent answer above...

This is a bit of a surprise:eek::eek:

(:D:D)

arthurking83
26-05-2017, 4:29pm
Raw formats are much more interesting.
Almost all(at least for current cameras now, so discounting any old long forgotten models) raw formats are based on tif files for the image.

Some raw file converters can convert a raw file to a tiff file quicker than they can for the much smaller jpg file type. This is because this is what the raw file actually is, with some proprietary manufacturer compression + some added camera specific data all embedded into the raw file.
TIFFs as we all know are huge files, compared to the raw file they were extracted/converted from. So unless there is a specific reason to use tif, then for space saving reasons, it's best to stick with raw over tif.
But like Tannin said, if you needed a non raw file format for whatever reason, then tif is the better way to go.
For those rare times when I've done a pano stitch, or a HDR, I always edit a bit on the raw(NEF) in my preferred software, then convert to tiff, and send the tiff files to the HDR or pano stitching software.
Some thirdparty software can't use tif(due to memory limitations) so jpg is the only way... only one free image stacking software that I tried a few times had this limitation.

The other handy thing about raw files, is that the negate the need to shoot jpg completely.
Some folks still shoot raw+jpg, but I think it's a redundant way to capture the files. If you're doing it for backup/redundancy reasons, still better to replicate the raw onto another card, rather than use a backed up jpg as the master copy if the primary copy fails in some way.
Some folks shoot raw + jpg for speed only, in that they need an easy and fast method to transfer captured images immediately from camera to 'office' where the jpgs will be uploaded. Some folks don't shoot raw at all, and only shoot jpg. Again for the right reasons, there's nothing wrong with that.

But if you're shooting raw + jpg for purpose of having an easy to 'not edit' jpg file, just use the raw file, which contains either 3 or 4 embedded jpg files within it anyhow.
A simple and free program to exctract those files exist, and the files it extracts can be 'resized' according to taste if required, or it can be the full sized(ie. full pixel data) which could be the better option if any cropping may be applied.

So instead of shooting raw+jpg, and cluttering up the cameras cards, you'd shoot in raw, send files to computer, on computer you invoke the extracting software ..(IJFR is what I've used, there are other's, I can't remember them!).. and send the jpgs to whatever directory you want.
IJFR has a shell extension that allows you to right click the directory where the raw files are and extract all the images within. It's too easy peasy to do, rather than download all those raws and then all the jpgs.

The extracted jpgs are the exact same jpg files as the jpg files you shot if you shoot with raw + jpg mode.
Note: They're not converted files, they are the embedded preview file(that you see on your review screen), which is a full pixel sized version of the raw data.
There's a hug difference between a converted jpg file and an extracted jpg file.
A converted jpg file will have the conversion flavour of the software doing the conversion. ie. if you use thirdparty software, then that software's rendition of what it thinks the image should look like is what you get. You tweak and twiddle sliders and buttons to suit.
The extracted jpg is how you shot it on camera.

Another thing I found handy(but rarely use it) is that Nikon's software(CaptureNX2) can 'convert' a tiff file into an NEF file type.
Nikon's raw file format is NEF, but these tifs aren't raw type tifs files, they just have the same 'flexibility' that PSD files have, in that any edit steps are non destructive and editable in any order is required.
So it looks like an NEF, is feels like an NEF, but it doesn't allow the in camera raw type edit adjustments than a true raw file does.

All the scans of really old photos that I've amassed over the years are captured(scanned) as TIFFs, but then converted to NEF in CNX2, tweaked a little here and there(taking into account the limited scope that CNX2 allows) and saved as an NEF again.
While there are advantages in terms of editability of the edit steps, there is a slight penalty in storage terms, about 10-15% size inflation of that type of NEF file.
And most of that info is useless to many people, as Nikon have ceased to support CNX2, and their modern cameras won't be recognised by it any longer .. and Nikon removed this feature from their latest software ...

.. have I even mentioned that Nikon's software marketing team must have had some form of collective cranial implosion(s), causing a vacuum environment within their teams ability to reason sensibly!

I think some other manufacturers raw file formats are similar to Nikon's in the way they operate, and we now have supposedly open DNG format as another raw file type.
I've read too many negatives in that Adobe haven't really made it fully open(the format), even tho it's free for anyone to use .. and some manufacturers still have some in depth data that they keep closed to prying eyes as well.

Tannin
26-05-2017, 7:11pm
This is a bit of a surprise:eek::eek:

(:D:D)

But ... but ... but .... you've always been a girl.

For six or eight years I've vaguely been aware that you were one of our valued and distinguished female members.

I can't have been wrong. I'm never wrong!

Um ... when did you change? Did it come as a surprise to you? Do I need to be careful in case I myself open the underwear drawer one day and get a little surprise of my own? :)

Hawthy
26-05-2017, 7:29pm
But ... but ... but .... you've always been a girl.

For six or eight years I've vaguely been aware that you were one of our valued and distinguished female members.

I can't have been wrong. I'm never wrong!

Um ... when did you change? Did it come as a surprise to you? Do I need to be careful in case I myself open the underwear drawer one day and get a little surprise of my own? :)

I recently had a similarly disturbing revelation on a travel forum that I frequent. Two people whom I had assumed to be "he and she" were "she and he". It does one's head in. That said, the terrible puns from AM always pegged him as a male in my mind. :D

arthurking83
27-05-2017, 8:16am
.... That said, the terrible puns from AM always pegged him as a male in my mind. :D

Yeah same here.

... but until I actually get to meet her .. oops.. err.. him!! one day, I'm still open to any possibility!