Imaging

Before we start to talk about file types is good to know something about color mixing. Two main principles are known in graphics, additive and subtractive. Additive method is used when application uses a light. Model uses red, green and blue color as basic colors which makes white when are joined together. Black color is - no light. By subtractive model the cyan, yellow and magenta colors are used. As these can not form a black color, this one is added as fourth component. White in this case is - no color. Most of digital cameras record the picture as RGRB Bayer color pattern which has to converted in file format that can be recognized by program for screen or print applications.

File format of picture depends a little on what camera gives.  It is good to know what you expect to do with a picture. View it on screen? Print the picture with bubble-jet printer? Print large format?

If you want to work something seriously on graphics, prepare yourself to have a headache of lots of different things like color depth, file format and quality of picture, color space, resolution, picture sizes on different screens, and more and more...

Color depth

Sensor converts the electric signal affected by a light into binary code. Number of color casts depends on sensor's AS converter which can record 2, 4, 8, 10, 12 or even more bits (Binary digit) per each pixel. Number of bits defines the total number of color casts per each channel which is called color depth. In the table on right you can find a number of casts per bits. So, on example, if RGB file contains an information of 12 bits for each color channel, the total number of colors casts will be 212 x 212 x 212 = 68.7 million.
Bits per pixel Color casts
16 65536
14 16384
12 4096
10 1024
8 256
4 16

File format

The picture could be recorded in one single file format but each of unit reasonably uses it's own file format. For screen applications we need fast loading of picture. In this case the pictures are resampled to smaller sizes and compressed with compression algorithm into JPEG file format. When one color of image is defined as transparent, the image is saved as GIF format. For good quality print the CYMK color model is used so for this purpose the TIFF file format should be prepared. Before picture appears in final shape it is changed by a program which uses mostly it's own file format. Most of better programs supports a work with all of file formats or offer an export tool to make a desired file format. 

In the table below some file types are described.

Color model

File type

Bits

Color casts

Use

Black - white 

vsi formati

1

21 =2

BW picture

Red - green - blue (RGB)

GIF

8

28 = 256

Screen icons

Red - green - blue (RGB)

JPEG

24

224 = 1,6x107

print, screen

Cyan - yellow - magenta (CYMK)

TIFF

3x12

 232 =4,3x107

print

Cyan - yellow - magenta (CYMK)

48 bit TIFF

4x12

 248 = 2,8x1014

print

Bayer pattern (RGBG)

12 bit RAW

12

 

sensor's pattern

Red - green - blue (RGB)

36 bit TIFF

(3*12)

 236 =6,8x107

print

File formats like  JPEG and TIFF  can save an information of different color depths. On example: picture could be saved in camera as RAW, 12 bit TIFF or even 24 bit compressed JPEG format.  24 bits in JPEG case does not mean bigger color depth but 8 bits per each color channel. When RAW is updated by a computer program like Photopaint or Photoshop, 48 bit TIFF, 32 bit TIFF or either 24 bit uncompressed JPEG can be created. 

Digital camera's file formats

Most of today's customer digital cameras don't offer RAW file format. In the table below you can see some file types that can be created by Dimage 7. Note than this one supports RAW file format too.

File type

Color depth

Color

model

File size 

Picture size

(pixels)

Compression

RAW 12 bit RGRB  9700 KB 2560x1800 no
12 bit TIFF 12 bit CYMK  14500 KB 2560x1800 no
Fine JPEG 8 bit RGB  1-2,5 MB 2560x1800 yes
Std JPEG 8 bit RGB  400-800  KB 2560x1800 yes
Econ JPEG 8 bit RGB  200-300 KB 2560x1800 yes
1600 JPEG 8 bit RGB  400-800 KB 1600x1280 yes
1280 JPEG 8 bit RGB  300-800 KB 1280*960 yes
640 JPEG 8 bit RGB  100-300 KB 640x480 yes

As Dimage 7 is not a professional camera, the recording of RAW files has a sense only when you have a good chance to snap a very good photo as converting process takes a lot of time. For convert a RAW into usable TIFF, JPEG, CPT or any of others format I need an afternoon of work for 50 images. By this camera I miss an uncompressed 24 bit JPEG format which encodes all of colors without losing any of color information but the file size is still smaller as RAW or even TIFF. When RAW is converted into other file type, the original color space can be lost if you use color matching.

When picture is used for screen application, the picture size depends on screen size and resolution. Usually for creation of web pages the screen resolution of 72 dpi is recommended, but this is not a good point. In the table below the optimal values of resolution for different screen sizes are stated.

Screen diagonal (inch) 14 15 17 19 21
Screen width (inch) 10 11 12,5 14,4 15,9
Screen width (mm) 246 269 318 366 404
Screen resolution

Optimal picture resolution (dpi)

640x480 66 60 51,2 44,4 40,3
800x600 82 75 64,0 55,6 50,3
1024x768 106 97 81,9 71,1 64,4
1152x864 119 109 92,2 80,0 72,5
1280x1024 132 121 102,4 88,9 80,5
1600x1200 165 151 128,0 111,1 100,6

If you intend to create a home page, this values is good to consider to find a best resolution ratio for viewing on different screens. But if you still want to know how larger or smaller will appear the picture on other side of wire, the information of how bigger or smaller will be a picture in other screens.

Screen diagonal (inch) 14 15 17 19 21
Screen resolution

Factor

640x480 1,5 1,6 1,9 2,2 2,4
800x600 1,2 1,3 1,5 1,7 1,9
1024x768 0,9 1,0 1,2 1,4 1,5
1152x864 0,8 0,9 1,0 1,2 1,3
1280x1024 0,7 0,8 0,9 1,1 1,2
1600x1200 0,6 0,6 0,8 0,9 1,0

 Last change 11 december 2001