graphics file formatsdttin/data compression/lecture 00 - graphics file... · 1/25/2013 2...

21
1/25/2013 1 LECTURE 0 1 GRAPHICS FILE FORMATS Bitmap files JPEG MPEG Reference: Encyclopedia of Graphics File Formats, http://netghost.narod.ru/gff/ 2

Upload: others

Post on 15-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

1

LECTURE 0

1

GRAPHICS FILE FORMATS

Bitmap files – JPEG

MPEG

Reference: Encyclopedia of Graphics File Formats,

http://netghost.narod.ru/gff/

2

Page 2: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

2

RECOGNIZING A GRAPHICS FILE

Contains digital photographs, line art, three-

dimensional images, and scanned replicas of

printed pictures

Bitmap images: collection of dots

Vector graphics: based on mathematical instructions

Metafile graphics: combination of bitmap and vector

Types of programs

Graphics editors

Image viewers

3

IMAGE BASICS

Pixel

Picture element

Smallest unit that can be displayed on a screen

Simplest graphics are black and white

0 – white

1 - black

http://www.bergen.org/AAST/ComputerAnimation/

4

Page 3: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

3

IMAGE BASICS

http://www.bergen.org/AAST/ComputerAnimation/

00000000000000000011110000000000000000 00000000000000001100001100000000000000 00000000000000010000000010000000000000 00000000000000100000000001000000000000 00000000000000100010001001000000000000 00000000000001000111011100100000000000 00000000000001000010001000100000000000 00000000000001000000000000100000000000 00000000000001000000000000100000000000 00000000000001001000000100100000000000 00000000000000100100001001000000000000 00000000000000100011110001000000000000 00000000000000010000000010000000000000 00000000000000001100001100000000000000 00000000000000000011110000000000000000 00011110010000000000000000000000000000 01100010010000000000000000000000000000 11000100100000000000000000000000000000 00000100100001110001011000101100100100 00111111110010010001101000110101100100 00001001000100100111001011100101001000 00010010000101101010010101001011011010 00010010000110110111111011111101101100 00000000000000000100000010000000011000 00000000000000001100000110000000110000 00000000000000001000000100000000100000

5

IMAGE BASICS

Bit depth

Number of bits per image

1 bit – black and white

4 bits – 16 colors (24)

8 bits – 256 colors (28)

16 bits – 65,536 colors (216)

24 bits – 16,777,216 colors (224)

Bit depth controls image file size

Higher the bit depth = larger filehttp://www.bergen.org/AAST/ComputerAnimation/

6

Page 4: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

4

IMAGE BASICS

http://www.bergen.org/AAST/ComputerAnimation/

1 bit781 bytes

16 bits11,982 bytes

7

IMAGE BASICS

RGB Color Model

Red – Green – Blue

Additive model combines varying amounts of

these 3 colors

http://en.wikipedia.org/wiki/RGB

Page 5: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

5

IMAGE BASICS

Individual pixels represented in memory as a

Red value

Green value

Blue value

Values represent intensity

If red is more intense, the color perceived is

towards the red

http://en.wikipedia.org/wiki/RGB

9

IMAGE BASICS

24-bit pixel value means

8 bits for each RGB value

256 possible values for each primary color

Values expressed as 0 – 255

http://en.wikipedia.org/wiki/RGB

10

Page 6: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

6

IMAGE BASICS

http://en.wikipedia.org/wiki/RGB

(0, 0, 0) is black

(255, 255, 255) is white

(255, 0, 0) is red

(0, 255, 0) is green

(0, 0, 255) is blue

(0, 255, 255) is cyan

(255, 0, 255) is magenta

(255, 255, 0) is yellow

11

IMAGE BASICS

Memory

Number of pixels times 3

640 x 480 pixels in size

640 x 480 = 307,200 total pixels

307,200 x 3 = 921,600 bytes

http://en.wikipedia.org/wiki/RGB

12

Page 7: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

7

13

UNDERSTANDING BITMAP AND RASTER IMAGES

Bitmap images

Grids of individual pixels

Raster images

Pixels are stored in rows

Better for printing

Image quality

Screen resolution

Software

Number of color bits used per pixel

IMAGE BASICS

Bitmap

Grid of pixels

http://www.bergen.org/AAST/ComputerAnimation/

Page 8: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

8

IMAGE BASICS

Resolution

Number of pixels per unit of measurement

dpi = dots (pixels) per inch

Typical monitor is 72 dpi

Total sizes range from

320 x 200

1280 x 1024

Higher resolution equals sharper image

http://www.bergen.org/AAST/ComputerAnimation/

15

IMAGE BASICS

Raster images

Collections of pixels

Stored as rows of pixels

Painted on the screen 30 times per second as

individual pixels

http://en.wikipedia.org/wiki/Raster_format

16

Page 9: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

9

IMAGE BASICS

Vector images

Uses geometric primitives

http://en.wikipedia.org/

IMAGE BASICS

Brain

Handles images as vectors

Eye

Captures mosaics of photons (bitmaps)

http://en.wikipedia.org/

18

Page 10: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

10

IMAGE BASICS

http://en.wikipedia.org/

19

IMAGE BASICS

Example of vector data for a circle

Radius

Center

Line style and color

Fill style and color

Much less data to be stored

http://en.wikipedia.org/

20

Page 11: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

11

IMAGE BASICS

Advantages of vector system

Smaller file sizes

Resizing does not change image

Easy modification of parameters

Moving

Scaling

Rotating

Filling

http://en.wikipedia.org/

21

UNDERSTANDING METAFILE GRAPHICS

Combine raster and vector graphics

Example: scanned photo (bitmap) with text

(vector)

Share advantages and disadvantages of both

types

When enlarged, bitmap part loses quality

22

Page 12: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

12

23

UNDERSTANDING GRAPHICS FILE FORMATS

Standard bitmap file formats

Graphic Interchange Format (.gif)

Joint Photographic Experts Group (.jpeg, .jpg)

Tagged Image File Format (.tiff, .tif)

Window Bitmap (.bmp)

Standard vector file formats

Hewlett Packard Graphics Language (.hpgl)

Autocad (.dxf)

24

UNDERSTANDING GRAPHICS FILE FORMATS

(CONTINUED)

Nonstandard graphics file formats

Targa (.tga)

Raster Transfer Language (.rtl)

Adobe Photoshop (.psd) and Illustrator (.ai)

Freehand (.fh9)

Scalable Vector Graphics (.svg)

Paintbrush (.pcx)

Search the Web for software to manipulate unknown image formats

Page 13: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

13

25

UNDERSTANDING DIGITAL CAMERA FILE

FORMATS

Witnesses or suspects can create their own

digital photos

Examining the raw file format

Raw file format

Referred to as a digital negative

Typically found on many higher-end digital cameras

Sensors in the digital camera simply record pixels

on the camera’s memory card

Raw format maintains the best picture quality

26

UNDERSTANDING DIGITAL CAMERA FILE

FORMATS (CONTINUED)

Examining the raw file format (continued)

The biggest disadvantage is that it’s proprietary

And not all image viewers can display these formats

The process of converting raw picture data to another format is referred to as demosaicing

Examining the Exchangeable Image File format

Exchangeable Image File (EXIF) format

Commonly used to store digital pictures

Developed by JEIDA as a standard for storing metadata in JPEG and TIFF files

Page 14: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

14

27

UNDERSTANDING DIGITAL CAMERA FILE

FORMATS (CONTINUED)

Examining the Exchangeable Image File format

(continued)

EXIF format collects metadata

Investigators can learn more about the type of digital

camera and the environment in which pictures were

taken

EXIF file stores metadata at the beginning of the file

28

UNDERSTANDING DIGITAL CAMERA FILE

FORMATS (CONTINUED)

Page 15: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

15

29

UNDERSTANDING DIGITAL CAMERA FILE

FORMATS (CONTINUED)

30

UNDERSTANDING DIGITAL CAMERA FILE

FORMATS (CONTINUED)

Page 16: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

16

31

UNDERSTANDING DIGITAL CAMERA FILE

FORMATS (CONTINUED)

Examining the Exchangeable Image File format

(continued)

With tools such as ProDiscover and Exif Reader

You can extract metadata as evidence for your case

CAN I CHANGE A GRAPHIC’S FILE SIZE?

Cropping

Selecting part of

an image

Change Color Depth

The number of colors

that are available for

use in an image.

• Greater color depth yields

better quality and larger file size32

Page 17: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

17

CAN I CHANGE A GRAPHIC’S FILE SIZE?

Increase Resolution

Pixel interpolation creates new

pixels by averaging the colors of

nearby pixels

• Can become “pixelated”

Decreasing Resolution

Decreases image quality

33

BMP – native bitmap graphic file format of

Microsoft Windows OS

PCX – one of original personal computer bitmap

graphics file formats (8-bit)

TIFF (Tag Image File Format) – highly flexible and

platform-independent graphics file format

Supports True Color

Used by scanners and digital cameras

ARE THERE DIFFERENT KINDS OF

BITMAP GRAPHICS?

34

Page 18: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

18

JPG – graphics format with built-in compression

You control level of compression

Uses True Color

GIF – limited to 256 colors

PNG – 48-bit True Color, compresses without losing data

Public domain format

ARE THERE DIFFERENT KINDS OF BITMAP

GRAPHICS?

35

HOW DO I KNOW WHICH GRAPHICS FORMAT

TO USE?

BMP Graphical elements (e.g. buttons)

PCX Not used much

TIFF High-resolution scanned images and

digital photos

JPG Photographic or scanned images that

might be on Web

GIF Popular for Web graphics

PNG Alternative to GIF

Page 19: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

19

Consists of set of instructions for recreating a picture

Instructions include:

Shape

Size

Position

Color

Common Extensions: wmf, dxt, mgx, eps, pict, cgm

WHAT IS A VECTOR GRAPHIC?

37

38

Page 20: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

20

Vectors resize better than bitmaps

Vector images usually require less storage

space than bitmaps

It is easier to edit an object in a vector graphic

than an object in bitmap graphic

Vector graphics are not usually as realistic as

bitmap images

HOW DO VECTOR GRAPHICS COMPARE

WITH BITMAP GRAPHICS?

39

IS IT POSSIBLE TO CONVERT A VECTOR

GRAPHIC INTO A BITMAP?

Rasterization

superimposes a grid

over a vector image

determines the color

for each pixel

Resulting graphic no

longer has the

qualities of a vector

graphic

Page 21: Graphics file formatsdttin/Data compression/Lecture 00 - Graphics file... · 1/25/2013 2 RECOGNIZING A GRAPHICS FILE Contains digital photographs, line art, three-dimensional images,

1/25/2013

21

This process is more difficult

Tracing software

Locates the edges of objects in a bitmap

image

Converts the resulting shapes into vector

graphics objects

CAN I CONVERT A BITMAP GRAPHIC INTO A

VECTOR GRAPHIC?

41