Understanding Digital Images Tony Hanson

Syllabus & Slides: http://www.rayson.us/aehanson/presentations/recordings-material Digital Image Life Cycle

Modification

Saving Reading

Creation Storage Viewing/Printing How is a Digital Image Created? o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o

Each dot is referred to as a Picture Element a.k.a. Resolution

• Determines the Pixel density • Measured in per Inch • Usually the same horizontally and vertically • Can be varied • My Camera: Small, Medium or Large • My Scanner: From 50 to 12,800 Pixels per inch Image Types

• Black and White • Color • Gray Scale Image Type: Black and White

The digitizing device examines each Pixel: • If there is something there, it is recorded as a Black value • If there is nothing there, it is recorded as a White value

Threshold

• Adjusts the point between ‘nothing’ (white) and ‘something’ (Black) • On my scanner, this can range in value from 0 to 255 Threshold: 10 Threshold: 200 Threshold: 110 Image Type: Black and White

• Good for lines and simple drawing • OK for text • Not so good for pictures

Advantage: Small files • Each pixel requires one bit • 0 for Black • 1 for White Image Type: Color

• The digitizing device examines each Pixel • The color of each pixel is recorded Image Type: 24-bit Color Computer Colors

• Each pixel’s color is broken down into three Primary Color Values • Red • Green • Blue • These colors can be mixed in varying intensities to create any other color • Each color has a unique numeric value • By default, each color’s value usually ranges from 0 to 255 Red

• Red is 255 (Maximum) • Green is 0 (Minimum) • Blue is 0 (Minimum) Green

• Red is 0 (Minimum) • Green is 255 (Maximum) • Blue is 0 (Minimum) Blue

• Red is 0 (Minimum) • Green is 0 (Minimum) • Blue is 255 (Maximum) Black

• Absence of all/any colors • Red, Green and Blue components are all 0 (minimum) White

• Combination of all colors • Red is 255 (Maximum) • Green is 255 (Maximum) • Blue is 255 (Maximum) Orange

• Combination of Colors • Red is 255 (Maximum) • Green is 153 • Blue is 0 (Minimum) Purple

• Combination of Colors • Red is 102 • Green is 102 • Blue is 153 Saving Colors

• Each color value ranges from 0 to 255 • These values can be stored in an 8-bit binary location

Red Green Blue 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

8 bits 8 bits 8 bits

24 bit Color Depth 16,777,216 unique colors 48 bit Color Depth

• Each color value ranges from 0 to 65,536 • These values can be stored in an 16-bit binary location

Red Green Blue 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

16 bits 16 bits 16 bits

48 bit Color Depth 281,474,976,700,000 unique colors How many Pixels at each color?

How Many 530 Pixels 498 410

0, 0, 0 255, 0, 0 0, 255, 0 0, 0, 255 255, 255, 255 “Black” “Red” “Green” “Blue” “White” Histogram

How Many Pixels

“Black” “White”

A Count of the number of Pixels at each color Over Exposed Under Exposed Proper Exposure Image Type: Grayscale

• The digitizing device examines each Pixel • The color of each pixel is recorded • But the color palate is limited to shades of Gray • Each color component (Red, Green, Blue) has the exact same value Equal Parts Red, Green and Blue

Grayscale Grayscale Grayscale Image Type: 8-bit Grayscale Grayscale Storage

• Since the Red, Green and Blue values are always the same, only one value is stored

• 8 bit color depth • Shades of Gray in 256 steps

• 16 bit color depth • Shades of Gray in 65,536 steps Three Image Types

Black and White Grayscale Color Digital Images have NO physical dimensions

All they have are Pixels These are all the same digital image:

Image Type: 24 bit Color Resolution: 72 Pixels per inch Image Type: 24 bit Color Resolution: 150 Pixels per inch Image Type: 24 bit Color Resolution: 300 Pixels per inch Image Type: 24 bit Color Resolution: 600 Pixels per inch Image Type: 24 bit Color Resolution: 1200 Pixels per inch Image Type: 24 bit Color Resolution: 2400 Pixels per inch Image Type: 24 bit Color Resolution: 4800 Pixels per inch Image Type: 24 bit Color Resolution: 9600 Pixels per inch Image Type: 24 bit Color Resolution: 12800 Pixels per inch Resolution

• Not enough resolution will result in fuzzy, pixelated images • Too much resolution may just be a waste of storage Consider the Source:

Not all images are created equal….

Newspaper Photograph

Newspaper Photograph

Photographic Print Created from a color negative Photographic Slide (film)

Negatives, Slides and photographic Prints • They have a LOT of resolution • They can be: • Scanned at high resolutions and • Used to create relatively large images. Pictures from newspapers, magazines or printed on modern printers • They do NOT provide much resolution • Scanning at high resolutions creates large, accurate images of poor quality pictures • They can NOT be enlarged much Aspect Ratio: Inches

The Ratio of the Width versus the Height of an image

• .85 x 1.3 inch (Photographic Slide): • 1.3 / .85 = 1.5 : 1 • 8 x 10 inch image: • 10 / 8 = 1.25 : 1 3 Inches • 4 x 6 inch image: • 4 / 6 = 1.5 : 1

6 Inches Aspect Ratio: Pixels

The Ratio of the Width versus the Height of an image

• 3456 x 2304 pixel image (Cannon Rebel) • 3456 / 2304 = 1.5 : 1 • 3264 x 2448 pixel image (iPhone 6) • 3264 / 2448 = 1.33 : 1 3264 Pixels

2448 Pixels Digital Image Process

Modification

Saving Reading

Creation Storage Viewing/Printing Saving Digital Images

• There are 100+ digital image file formats defined • We will only be discussing 4 of them • Two major categories : • Lossless • Lossy Lossless File Formats

Creation Storage Viewing/Printing Saving Reading

Everything created here: Is available here: • Every Pixel • Every Pixel • The same Color • The same Colors Lossy File Formats

Creation Storage Viewing/Printing Saving Reading

Everything created here: Is NOT available here: • Every Pixel • Fewer Pixels • The same Color • Fewer and/or different Colors Why Use A Lossy File Format?

• The create significantly smaller files • They offer acceptable quality for many uses • These formats were mainly created to minimize: • File storage requirements and transmission times • This was VERY important when: • Storage was expensive • Connectivity was painfully slow Commonly Used File Formats

• TIFF • JPG • PNG • RAW TIFF

• Tagged Image File Format • Has been format of choice for digital archivists and preservationist for many years • Lossless • Disadvantages: • Creates large files • Many browsers cannot display TIFF formatted images JPEG

• Joint Photographic Experts Group • Lossy • Widely used: Supported by every browser I am aware of • The compression algorithm saves information about groups of pixels • The degree of compression can be varied • The compression is performed every time the file is saved • Causes additional loss every time the file is saved • Does NOT support transparent images What is a transparent image?

A transparent image allows you to view the color of the background

Not Transparent Transparent

PNG

• Portable Network Graphics • Supports transparent images • Lossless • Performs file compression (make its files smaller) • Supported by every browser I am aware of How do file sizes compare?

TIF PNG JPG 600 dpi, 24 bit color depth (MB) 70 30 10 Savings compared to TIF: (-57%) (-85%) What about the image quality?

JPG 300 dpi, 24 bit Color Depth TIF How do file sizes compare: Resolution?

TIF 300 dpi, 24 bit color depth (MB) 18 600 dpi, 24 bit color depth (MB) 70 2400 dpi, 24 bit color depth (MB) 1125 Digital Cameras

• Most create JPG image files • Higher end cameras will also create a Raw format • This is essentially a TIF format • You can use software compatible with your camera to read and convert RAW to JPG, TIF and other file formats Image Type Conversion

• Best: • lossless -> lossy • lossless -> lossless • lossy -> lossy

• You can save a TIF (or PNG) image as a JPG • The JPG file will be a lower quality image

• You can also save a JPG as a TIF or PNG • The TIF (or PNG) will have the same (lower) quality as the JPG Recommendations

• Use TIF of PNG when digitizing important/significant images • Make JPG copies and use them on social media • If JPG is all you have: • Make a master copy • NEVER edit/save it • Work with a copy of the master if you need to edit it Metadata

• Data about something • Digital Metadata is Embedded in each file

Pre-Digital Metadata • Date (Aug 61) • Description (Hanson – Evans – Tollief’s Fam) File Format

Image Data Format Specific (Pixels) (TIFF, JPG, PNG, etc…)

Camera Data Exchangeable Image (EXIF) File Format

Other Information MetaData

Digital Image Process

Modification

Saving Reading

Creation Storage Viewing/Printing

• PC • Smart Phone • Tablet • Monitors

• Monitors have a fixed number of pixels • Common resolutions: • 1366 x 768 • 1920 x 1080 • 1024 x 768 • 1280 x 800 • Common Image Sizes: • 3456 x 2304 (Cannon Rebel camera) • 3264 x 2448 (Apple iPhone camera) • 4127 x 5798 (Book Cover) Three Options When Viewing Images

• Full / Actual Size • Enlarged / Zoomed • Reduced size Full Size / Actual Size

• Each pixel from the image has a pixel on the monitor Full Size / Actual Size

• Each pixel from the image has a pixel on the monitor • This is the most accurate way to view • This is the most accurate way to view colors • Each monitor pixel has Red, Green and Blue sub-pixels • Since the image has more pixels than the monitor, you will probably only be able to view a portion of the image at any one time

Enlarged / Zoomed

• Image pixel spacing is larger than the monitor pixel spacing ox o x o xo o x o x o ox o x o xo o x o o o o o o o o o o o o x x x x x x x x x o o o o o o o o o o o o ox o x o xo o x o x o ox o x o xo o x o o o o o o o o o o o o x x x x x x x x x ox o x o xo ox o x o ox o x o xo ox o o o o o o o o o o o o x x x x x x x x x o o o o o o o ? o o o o o ox o x o xo ox o x o ox o x o xo ox o o o o o o o o o o o o x x x x x x x x x

Enlarged / Zoomed

• Image pixel spacing is larger than the monitor pixel spacing • The enlarged image may appear fuzzy/pixelated • Colors may be displayed inaccurately Reduced size

• Monitor pixel spacing is larger than the image pixel spacing • The image may appear to lack resolution • Colors may be displayed inaccurately Printers

• Printers create images using a completely different process • We will look at two techniques • Black and White • Color Black & White Printing

• A Black & White printer can only print one color: Black • The “other” color (usually White) is the color of the paper Printer Effective Resolution

A 4 x 4 group can be used to create 16 shades of gray • White (no black dots) • Black (16 black dots)

For a 1200 dpi printer the Effective Resolution is 300 Pixels per inch • (1200 / 4 = 300) Printer Effective Resolution

A 6 x 6 group can be used to create 36 shades of gray • White (no black dots) • Black (36 black dots) • More Shades

For a 1200 dpi printer the Effective Resolution is 200 Pixels per inch • (1200 / 6 = 200)

Color Printing

• Color printers create colors by printing primary colors • Red, Blue and Yellow • Black is also used • The human eye ‘averages’ them together allowing us to see the intended color • This also lowers the effective resolution since the printer must print several different dots to create the desired color

Printing Recommendations

• 300 pixels per inch is a good target to use when printing images • Remember: This is the number of pixels for each inch of the image when it is printed. • You need to take this into account when you scan the image Example: Color Slide

•Goal: Create a 8 x 10 inch color print •Film size: 0.8” High x 1.3” Wide Aspect Ratio

• The 8 x 10 frame has an aspect ratio of 1.25:1 • The slide has an aspect ratio of 1.5:1 • The enlarged image will be 8 inches x 13 inches

I will need to trim 3 inches from the sides to make the print fit into my frame Resolution

• When I print the 8 x 10 inch image I want to have at least 300 pixels per inch • I need to scan the small slide at a high resolution to achieve this 8 inches x 300 pixels per inch 2400 pixels

2400 pixels = 3000 pixels/inch 0.8 inches

Scan at 3200 Pixels per Inch

• Digital Images consist of Pixels

• They have a resolution measured in Pixels per inch • Too little resolution – Fuzzy, pixelated images • Too much resolution – Needlessly large files

• Three Images Types • Black and White • Color (24 bit or 48 bit color depth) • Gray Scale (8 bit or 16 bit color depth) • Histogram – Graph showing Count of Pixels at each color

• Aspect Ratio: Height vs Width

• Not all images are the same quality

• File formats • Lossless – Use for “important/valuable” images • Lossy • Four commonly used formats • TIFF – Lossless • PNG - Lossless, supports transparency • JPEG – Lossy, does not support transparency • RAW – TIFF, High end cameras

• Monitors display colors accurately

• Printers – limited resolution available • Target: 300 pixels per inch Questions?

Syllabus & Slides: http://www.rayson.us/aehanson/presentations/recordings-material122