File Basics

The file is a mechanism for transporting and saving the information captured on the sensor. We can think of the image as being a series of locations called pixels. After the ADC has completed its task, the light information takes on the form of a series of binary numbers. These data, the binary numbers for each pixel, are not visible in that form and must be processed. To understand the data, certain things must be communicated about the file. We can understand the captured light intensity information from the sensor by looking at the header for the file.

Header

The header contains information and a set of instructions that tell the computer how to open, read, and interpret the information in the file. The first piece of information is the name of the file. Most cameras apply file names in sequential order so they will remain separate in the memory system of the camera. Many cameras allow you to create a naming protocol for your images. This allows you to manage your images without having to rename them as you make your exposures. Other file properties and information are likely to be included in the header instead of an attached metadata file. These pieces of information include the date created, modification date, size, resolution, and bit depth.

Regardless of the way the camera names the files, you will need to have a naming convention and a way to apply and consistently add a new name if there is not enough information to organize the captured images. In your lifetime you could make hundreds of thousands, or millions, of images, and without a naming convention it will be difficult to maximize your use of these images over time. This need will be addressed later in the book when we discuss asset management.

The most important information in the header is the type of file format that is used. Although this information is embedded in the header, it is also normally seen as an extension following the name of the file. The file format tells the computer how to open and read the data within. If this information is not included, or if there is a mismatch with the file format, the image cannot be decoded and opened. Most importantly, this includes the bit order. The bit order indicates whether the number at each pixel will be read in an ascending or descending order.

For example, the number 23 in binary can be read from either end (10111 or 11101). Since these numbers are not inverse or complementary, it cannot be assumed that reading the number in the wrong bit order will produce a positive or negative image based on the data within the file. Only one bit order will produce a proper image.

CHAPTER 7 SAViNG CAPTURED iMAGES

Another piece of critical information that will be used to construct the image from the file is the way the color should be interpreted. This includes both the bit depth of the file and its relation to a color space (a specific set of colors that relate to data points expressed in a collection of numbers). Although the preview image for most cameras is interpolated in the form of a JPEG file, this may not be the format associated with the file. Therefore, the color information that is shown on the preview is not necessarily the same information that will travel with the file.

Compression

The last piece of information contained in the header is how the image will be decompressed and by how much. Almost all cameras compress data to a certain level before the initial file is written. This is the reason that RAW conversion software is not interchangeable among manufacturers. Although converters such as Adobe Camera Raw can convert these files, it must be noted that this software is not resident in the camera; plug-ins must be installed so the converters can read the headers from various manufacturers and various cameras.

Although camera systems provide a certain amount of file compression, several file formats allow further compression. Compression is used to make the file more manageable in terms of size while at the same time allowing the image to be reconstructed when it is opened so the original picture can be displayed. Compression can be applied within the camera's operating system or subsequently after the image has been processed externally.

There are three basic types of compression: lossless, lossy, and visually lossless. These terms describe what will happen to the file and what the resulting decompressed image will contain. Lossless refers to a process in which the decompressed file will result in exactly the same image that was compressed. At the other extreme is lossy compression, in which the decompressed file does not contain all the data that was in the file prior to compression. Visually lossless compression uses human perception to minimize the visual aspects of compression while providing a reasonable reduction in file size.

To simply explain the difference between a lossless and lossy system, we can use a simple arithmetic demonstration. If we use the simple equation 2 + 3 = 5, we can then reverse the elements and function of the equation to 5 - 3 = 2. We can see that we have recovered the number 2 from reversing the equation. We started our statement with the numbers 2, 3, and 5, and we ended up with a statement that has these three numbers. On the other hand, we can begin with the equation 2 + 3 = 0.667. When we reverse this equation to 0.667 x 3 = 2.001, we do not end up with the same numbers we started with. Therefore, we can say that in the second example our equation is not mathematically reversible. Lossless compression is based on a mathematically reversible set of compression instructions, and lossy compression does not adhere to a purely mathematically reversible construct. Therefore, with lossy compression the image data will not be the same when it is decompressed as it was when it was compressed.

A common method used to provide lossless compression is known as run length compression. In this system the compression is accomplished by counting the number of pixels in any string, which is the run length, and defining that string by its color number and the number of pixels that have that number. For example, if you have a blue sky where the gradation is slight, you might have a string length of 50 pixels with exactly the same color. This would require 50 bytes of data in an uncompressed file. Using run length compression, these data would be expressed with two numbers: 50 and the color number. This would probably not require more than two bytes of data. Although this method is effective in reducing the size of the file, it has severe limits. The amount of compression can only achieve about a 3:1 ratio.

In lossy compression there is no intention to decompress the image to its original data. Therefore, choices can be made in the way the information is handled that will allow for more efficient file size reduction without the need to exactly reconstruct the original data. For example, with this system small color variations may be ignored and assumed to be the same as nearby colors to allow more efficient saving. Within JPEG compression the image is broken up into blocks of 8 pixels by 8 pixels, and an algorithm reduces the data by applying compression to each group as a whole. Lossy systems provide very high compression ratios, potentially as high as 300:1. However, to avoid major artifacts, the compression ratio should be 25:1 or less.

Visually lossless compression uses the way we see as the basis for how it will reduce the files. Human perception is far more attentive to detail than color. For this reason, visually lossless compression reduces or discards a portion of the color information while maintaining all the luminance information. For example, if only one pixel in a block of four pixels retains its color information, then when the image is decompressed the color can be reinterpolated for the pixels whose color information was altered. Since the detail information contained in the luminosity of each pixel was not altered, the human eye is not likely to perceive the difference between the original and the decompressed image.

© by Moose Peterson. Courtesy of the artist.

-ocxmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.2-c828 1.124078, Tue Sep 11 2807 23:21:40 -srdf :RDF xmIns:rdf»"http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf¡Description rdf:about="" xmLns:tiff="http://ns.adobe.com/tiff/1.0/"> <t i f f:Makes«IKON CORPORATION Vt i f f:Make> -stiff :Model>NIKON D280Vtif f :ModeL> -stiff :0rientation>8Vtiff :Crientation> -st i f f: I mageW idth>3872Vtiff :ImageWidth> <tlf f: ImageLength>2592Vtif f: ImageLength>

■it i f f:Photometr i cInterpretat i on>2 Vt i f f:Photometr i cInterpretat i on> <tiff: Samp I esPerP i xe I >3 Vt i f f:SamplesPerPixei> ■stiff :BitsPerSamp Le> <rdf :Seq>

<r<if :Li>16Vrdf :ii> <rdf: L i>16 Vrdf : I i> «rdf :Li>16Vrdf :ii> Vrdf:Seq> Vt i f f: B i tsPerSamp I es-Vrdf:Description> cdf ¡Description rdf:about»"" xmLns:exif="http://ns.adobe.com/exif/1.0/"> <ex i f:Ex i f Vers i on >0221 Vex i f:Ex i f Vers i on> -=exif:ExposureT i me>4/l Vexi f:ExposureTime> <exif:ShutterSpeedValues-2/lVexif:ShutterSpeedVa Lue> ■sexif :FNumbersB/lVexif :FNumber> -sexif :ApertureVaiue?6/lVexif :ApertureVaiue> <exif:ExposureProgram>lVexif:ExposureProgram>

<ex i f:DateT i meOr i g i na L >2010-07-03T22:97:47.98-04:90</ex i f:DateT i meOr i g i na L >

-=sxif :DateTimeDigitized>2010-07-03T22:07:47.08-04:00 Vex i f: DateT i meD i g i t i zed>

<exif :ExposureBiasValue>J3/6Vexif :ExposureBiasValue>

-sex if :MaxApertureVa l ue>36/10 Vex i f: MaxApertureVa I ue>

-sex if: Meter ingMode>2 Vex if: Meter ingMode>

<exif:Light5ource>£Vexif:LightSource>

<exif:FocaiLength>180/10Vexif:Foca LLength>

-=exif :SensingMethod>2Vexif :SensingMethod>

<exif :Fi leSource>3Vexif :Fi LeSourco

-sexif : Scene Types! Vex if : SceneTypes

-sex if ¡Focal Length I n35mmFi Lm>27Vexif:FocalLengthIn35mmFi lm>

<exif:CustomRendered>0Vexif:CustomRendered>

<exlf:ExposureMode>lVexif:ExposureMode>

-=sxif :White8al ance>0 Vex if :White8aiance>

■sexif :SceneCaptureTypes0Vexif:SceneCaptureTypes

-sexif :GainControlsBVexif :GainControls

-sex if: Contrasts Vex i f ¡Contrasts

<exif ¡Saturation^ Vex if ¡Saturation?

<exif:Sharpness>GVexif:Sharpness>

<sxif :SubjectD>istanceRange>0Vexif :SubjectDistanceRange> ■sex if:DigitalZoomRati os-1/1 Vexi f:D i g i ta L ZoomRat i o> ■sexif :PixelXDimensi ons3B72 Vex i f:P i xe L XD i mens i on> <ex i f: P i xe 1 YD i mens i ons2592Vex i f: P i xe L YD i mens i on> -sexif: I505peedRatings> <rdf :Seq>

<a-df :Li>100</rdf :Li> Vrdf:Seq> Vex if :ISQSpeedRatingss-<ex i f:FIash rdf:parseType="Resource"> -sexif :Fired?FalseVexif :Fired> ■sexif:Return>0</exif:Return> <exif : Modes® Vex if :Mode> ■sexif :FunctionsFalseVexif :Function> -sexif :RedEyeModesFalseVexif :RedEyeModes--s/exif :Flash> Vrdf: Rescript ions-■cdf ¡Description rdf:about="" xm Lns:xap="http://ns.adobe.com/xap/1.0/"> <xop:Mod i f yDates2010-07-03T22:07:47.08-04:00 Vxap:Mod i f yDate> -sxap: Create Date s2010-07-83T 22:87:47.8B-04: 00 Vxap :CreateDates-<xap:CreatorToo LsVer.1.08 Vxap:CreatorTool> -«ap :MetadataDate?2010-07-03T23:42:14-04:00 Vxap: MetadataDates <xap: Rat i ng>£ Vxap: Rat i ng> Vrdf ¡Descriptions-■irdf description rdf:about="" xm L ns: aux=" http: //ns. adobe. com/ex i f /1.0/aux/" s-<aux: Lens I nf o>lB8/10 780/18 35/18 45/18Vaux: Lens Infos -saux:Lens>18.0-70.0 mm f/3.5-4.5Vaux:Lens> <aux:ImageNumber>6528Vaux:ImageNumber> Vrdf :Description> ■irdf description rdf:about="" xm Lns:photoshop="http://ns.adobe.com/photoshop/1.8/"s -sphotoshop: Co lorMode>3Vphotoshop :Co I orMode> «photoshop:ICCProf i Le/s-

<photoshop: Si decarForExtension>NEFVphotoshop ¡SidecarForExtensi on> </rdf¡Descriptions-<rdf description rdf:about="" xm L ns:xapMM="http://ns.adobe.com/xap/1.8/mm/"> -sxapMM: PreservedFi I eNamesOSO_0807 .NEF VxapMM: PreservedFi I eNames-Vrdf: Rescript ion> ■cdf ¡Description rdf:about="" xm Lns:crs="http://ns.adobe.com/camera-raw-settings/1.0/"> -=crs:RawFi I eName>JSO_0007 .NEF Vers: RawFi I eName> <cr s: Vers i on>5.0 Vers: Ver s i on> ■scr s: HasSett i ngs>Fa L se Vers: HasSett i ngss--scrs :HasCrop>f a LseVcrs :HasCrop> <crs: AI readyApp I i ed?Fa I se Vers: AI readyApp L i ed> Vrdf :Description> Vrdf :RDF> Vx:xmpmeta>

Learn Photoshop Now

Learn Photoshop Now

This first volume will guide you through the basics of Photoshop. Well start at the beginning and slowly be working our way through to the more advanced stuff but dont worry its all aimed at the total newbie.

Get My Free Ebook


Post a comment