Bitmapped Graphic Data

Slides:



Advertisements
Similar presentations
Digital Color 24-bit Color Indexed Color Image file compression
Advertisements

Image Data Representations and Standards
Raster graphics. Colour depth 01 1 bit pr pixel = 2 combinations (2 1 ): 2 bits pr pixel = 4 combinations (2 2 ): bits pr pixel = 16 combinations(2.
Dale & Lewis Chapter 3 Data Representation. Representing color Similarly to how color is perceived in the human eye, color information is encoded in combinations.
Color COM 366 Web Design & Production. RGB color Amount of light in each channel Closer to 255, whiter color gets Every color has value for red,
Multimedia for the Web: Creating Digital Excitement Multimedia Element -- Graphics.
Media: Digital Image. Representing Digital Images ● Pixel ● Resolution ● Aspect ratio.
Graphics in the web Digital Media: Communication and Design
MM Topic 2 - Bit mapped and Vector Graphics Data 1 Topic 2 – Bit mapped & Vector graphics Still images – the general name for any graphic that doesn’t.
How Images are Represented Bitmap images (Dots used to draw the image) Monochrome images 8 bit grey scale images 24 bit colour Colour lookup tables Vector.
File Formats By Jack Turner. Raster (Bitmap) Raster or bitmap is a dot matrix data structure, containing columns of dots and rows, of a graphics image.
Part A Multimedia Production Rico Yu. Part A Multimedia Production Ch.1 Text Ch.2 Graphics Ch.3 Sound Ch.4 Animations Ch.5 Video.
I Power Multimedia Technology Video Data. Video data Video is a sequence of individual pictures or frames, taken one after another. These are played back.
Video Data Topic 4: Multimedia Technology. What is Video? A video is just a collection of bit-mapped images that when played quickly one after another.
Zinnia Bell. RAWimages are image files that have not yet processed, they contain minimally processed data from the image sensor of either a image scanner,
1 Creating Web Graphics Outline 2.1 Graphics Types 2.2 Vector Graphics 2.3Bitmapped Graphics 2.4Graphics for the Web 2.5 GIF (Graphics Interchange Format)
GRAPHICS/IMAGES INFSCI Source: Learning Web Design by Jennifer Niederst RobbinsJennifer Niederst Robbins Creating Images:  Scanning  Be aware.
1 Bitmap Graphics It is represented by a dot pattern in which each dot is called a pixel. Each pixel can be in any one of the colors available and the.
Faculty of Sciences and Social Sciences HOPE Website Development Graphics Stewart Blakeway FML 213
Computer Systems Nat 4.5 Computing Science Data Representation Lesson 4: Storing Graphics EXTENSION.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
Lab #5-6 Follow-Up: More Python; Images Images ● A signal (e.g. sound, temperature infrared sensor reading) is a single (one- dimensional) quantity that.
Presentation Design: Graphics. More About Color “Bit depth” of colors -- This is based on the smallest unit of information that a computer understands.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Photoshop Software Rasterized, file formats, and printing choices.
Digital Image: Representation & Processing (2/2) Lecture-3
Bit-Mapped Graphic Data: Input (Capture) Hardware Multimedia – Section 2.
Digital Cameras And Digital Information. How a Camera works Light passes through the lens Shutter opens for an instant Film is exposed to light Film is.
1 Ethics of Computing MONT 113G, Spring 2012 Session 10 HTML Tables Graphics on the Web.
Image formats. Basic terminologies… Pixels: Pixels are the building blocks of every digital image. a pixel is a single point in a graphic image. Resolutions:
44212: Web-site Development Optimising Images for Web-pages Ian Perry Room:C49 Extension:7287
Marr CollegeHigher ComputingSlide 1 Higher Computing: COMPUTER SYSTEMS Part 1: Data Representation – 6 hours.
Web Graphics. Colours and Display Graphics and Modems 28.8kbps = 3.6 KB per second 36 KB takes 10 seconds to load. Pixels and color.
2D Graphics Theory & Principles. Single Point Smallest addressable area on screen or digital image.
Graphics An image is made up of tiny dots called pixels (“picture elements”) The resolution determines the.
Multimedia Basics (1) Hongli Luo CEIT, IPFW. Topics r Image data type r Color Model : m RGB, CMY, CMYK, YUV, YIQ, YCbCr r Analog Video – NTSC, PAL r Digital.
I Power Multimedia Technology Graphics Higher Computing.
Digital Images are represented by manipulating this…
Image File Formats. What is an Image File Format? Image file formats are standard way of organizing and storing of image files. Image files are composed.
Resolution The resolution of an image is determined by the number of individually addressable points that make up the image, whether it is the number.
Image File Formats By Dr. Rajeev Srivastava 1. Image File Formats Header and Image data. A typical image file format contains two fields namely Dr. Rajeev.
HTTP transaction with Graphics HTML file + two graphics files.
Image File Formats Harrow Computer Club – Wed, 1 Dec 2010 Bob Watson MA CMath MIMA MBCS.
HOW SCANNERS WORK A scanner is a device that uses a light source to electronically convert an image into binary data (0s and 1s). This binary data can.
Image Editing Vocabulary Words Pioneer Library System Norman Public Library Nancy Rimassa, Trainer Thanks to Wikipedia ( help.
Scanner Scanner Introduction: Scanner is an input device. It reads the graphical images or line art or text from the source and converts.
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
Software Design and Development Storing Data Part 2 Text, sound and video Computing Science.
BITMAPPED IMAGES & VECTOR DRAWN GRAPHICS
2.01 Understand Digital Raster Graphics
2.01 Understand Digital Raster Graphics
DIGITAL MEDIA FOUNDATIONS
Data Representation.
Denary to Binary Numbers & Binary to Denary
Binary Representation in Audio and Images
Computer Science Higher
2.01 Understand Digital Raster Graphics
2.01 Investigate graphic image design.
Raster Images CPSC 1030.
A computer display is made up of small squares, called pixels.
GRAPHICS Source:
Digital Images.
1.01 Investigate graphic types and file formats.
Representing Images 2.6 – Data Representation.
Web Design and Development
2.01 Understand Digital Raster Graphics
2.01 Investigate graphic image design.
2.01 Understand Digital Raster Graphics
2.01 Investigate graphic image design.
2.01 Investigate graphic image design.
Presentation transcript:

Bitmapped Graphic Data

Bitmapped Graphic Data Hardware – CCD Charge-Coupled Device (CCD) A CCD is a device containing grids of pixels that are used in scanners, digital cameras and digital video cameras as light-sensing devices. Bitmapped Graphic Data

Bitmapped Graphic Data Hardware – CCD An image is projected by a lens onto a 2D rectangular array of CCD image sensors causing each sensor to store light that representing the image. Bitmapped Graphic Data Each sensor stores the light for a single pixel so the more CCDs the higher the resolution of the image. An ADC is used to convert the signal to digital and a binary value for each CCD sensor is stored.

Bitmapped Graphic Data Hardware – Digital Camera Digital cameras Have a 2D rectangular array of CCD sensors to capture the image Each CCD sensor captures the light for roughly one pixel Therefore the more CCDs the higher the resolution of the image The CCD converts the light into an electrical signal i.e. a voltage An ADC is used to convert the signal to a digital signal Now the image can be stored on the computer in digital form Bitmapped Graphic Data

Bitmapped Graphic Data Capturing photo-images/video Sequence of events Image 1 Select IMAGE Lens 2 Image is directed through LENS CCD 3 Light attracted to CCD sensors Bitmapped Graphic Data ADC 4 Pass analogue signal through ADC chip DSP 5 Apply signal processing via DSP Storage 6 Store on backing storage

Bitmapped Graphic Data Hardware – Scanner Scanner Hard copy of image is scanned Light is reflected onto light-sensitive diodes that translate the light into a voltage An ADC converter translates each voltage into a digital pixel Pixel data is transferred to a software application the data can be read from Bitmapped Graphic Data

Bitmapped Graphic Data Role of ADC When an electrical signal is received from the CCD it needs to be converted to a digital signal by an Analogue to Digital Converter chip. Bitmapped Graphic Data

Bitmapped Graphic Data Storage of graphic data Bitmaps The entire image is stored as an ordered map of binary codes that represent the individual colour of each pixel. The size of each binary value is known as the colour (bit) depth. We can easily work out how many colours can be represented: Number of colours = 2 bit depth Bitmapped Graphic Data Examples Bit depth is 1 bit: 21 => 2x1 = 2 colours Bit depth is 2 bits: 22 => 2x2 = 4 colours Bit depth is 3 bits: 23 => 2x2x2 = 8 colours … Bit depth is 8 bits: 28 = 2x2x2x2x2x2x2x2 = 256 colours So, a bitmap that has 16 colours means a bit depth of 4 bits!

Bitmapped Graphic Data Storage of graphic data Indexed Colour Colours available are indexed in an array that acts as a ‘palette’ of available colours - known as a Colour Lookup Table (CLUT). Each pixel stores the index to the array (palette) for the colour shade required rather than the actual binary colour code. These tables typically store 4, 16, or 256 distinct colours. Bitmapped Graphic Data Advantage: Indexed Colour reduces file/memory size and transfer times. Disadvantage: Limited number of distinct colours.

Bitmapped Graphic Data Storage of graphic data Indexed Colour Examples 16 colours 4 colours Bitmapped Graphic Data 256 colours 24 bits

Bitmapped Graphic Data Storage of graphic data 24-bit Bitmap A set of 3 bytes (24 bits) represents the colour of each pixel, known as the RGB Colour Code. Green 0-255 Red Blue Each pixel actually consists of three smaller dots – one for each of the primary colours, which in electronics are Red, Green and Blue. Bitmapped Graphic Data In 24-bit colour each of the primary colours has a byte (8 bits) allocated to store the colour shade so there are 16, 777, 216 possible shades. Note: A colour lookup table is not needed as the bitmap stores the actual 24-bit colour code.

Bitmapped Graphic Data Storage of graphic data Bitmapped Graphic Data

Bitmapped Graphic Data Hexadecimal and colour codes Extension Hex is a base 16 numbering system commonly used to represent RGB colour codes to reduce the number of digits to be worked with. Hex uses the digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F Where A = 10, B =11, C = 12, D = 13, E = 14 and F = 15. This example hex colour code #9900CC means the RGB mix for this shade is: Red – 99 Green – 00 Blue - CC Bitmapped Graphic Data And this converts nicely into binary and into decimal….. Colour: Red Green Blue Hex: 9 C Binary: 1 0 0 1 0 0 0 0 1 1 0 0 Decimal: 153 204

Bitmapped Graphic Data Hexadecimal and colour codes Extension In a Windows application you can enter the decimal values for Red, Green and Blue to customise and mix the colour shade you require. Bitmapped Graphic Data Always remember though that the colour code will always be stored by the computer system as a 24-bit binary code!

Bitmapped Graphic Data Storage of graphic data Run Length Encoding (RLE) RLE is a simple lossless data compression algorithm. Sequences of repeating data (runs) are stored as a count and a single data value. Example: Before RLE: aaaaaaaaaabbaaaaaabbaaaaaaaaaabbaaaaaabb After RLE: 10a2b6a2b10a2b6a2b So original 40 characters reduced to 18 characters! RLE and bitmaps RLE can be applied to bitmaps to reduce file size. It works best where there are solid blocks of colour and a count is made of the number of pixels in the run with the same colour code. The length of each run is held in 1 byte so the maximum size of a run of colour is 255 repetitions. Bitmapped Graphic Data

Bitmapped Graphic Data Storage of graphic data Example – RLE and Bitmaps A run of 10 x 10 pixels all shaded black with bit depth of 8 bits (1 byte). RLE algorithm Bitmapped Graphic Data Image Bitmap Compressed Bitmap Original file: 100 bytes Compressed file: 40 bytes

Bitmapped Graphic Data Storage of graphic data Graphics Interchange Format (GIF) Compressed using LZW lossless compression with a colour depth of 8-bits and a palette of 256 RGB colours. Colour limitation means not suited to photographs but ideal for continuous colour blocks e.g. logos, clip-art etc. GIF supports transparency and animation, usually 25 frames per second and with a separate 256 colour palette per frame. Bitmapped Graphic Data GIF files can be stored as: Non-interlaced - each line of the image is drawn one after the other Interlaced - every alternate line or bit (fuzzy to sharp) is drawn and then the rest after. Advantage: with interlaced the user can see the graphic build up and decide whether they want to view it before the full image is complete.

Interlacing in Action Allows you to view an image before it is fully downloaded Image is gradually revealed

Bitmapped Graphic Data Storage of graphic data Lempel-Ziv-Welch (LZW) A lossless data compression algorithm that is part of the GIF format. It stores repeated patterns of data in a dictionary/table and uses pointers to point to the dictionary to obtain the colour code for the pixels in the pattern. Colour Pattern Dictionary Code 1 2 .. 256 257 258 259 Bitmapped Graphic Data Original Image Converted to 258,259,258

Bitmapped Graphic Data Storage of graphic data Portable Network Graphics (PNG) Designed to replace GIF; uses lossless compression and up to 256 colours from an RGB palette-indexed colour table (CLUT) or can be 24-bit RGB. Parts of the image can be made transparent i.e. a single pixel value or an alpha channel. Can be interlaced allowing a clearer low-resolution image to be visible earlier in the transfer. Bitmapped Graphic Data PNGs are better than JPGs for storing photographs that require further editing. Once finally edited, the PNG can be converted to JPEG to reduce file size. However they are single-image so do not support animation.

Bitmapped Graphic Data Storage of graphic data Joint Photographic Expert Group (JPEG) A graphics format that uses lossy compression to cut out parts of the image that the human eye will not notice. It supports 24-bit colour and is suited to graduated colours and textures so works well for photographs. Advantage Far superior to GIF, and preferable to PNG as files sizes are smaller (due to lossy compression) with very little loss of overall quality. Disadvantage Suffers from generation loss i.e. the loss of quality when editing after compression. Does not support transparency Bitmapped Graphic Data

Bitmapped Graphic Data How to calculate the number of pixels Example An image is 400 pixels by 400 pixels at 72 dpi. How many pixels in this image? Solution No. of pixels: 400 x 400 = 160,000 pixels Example An image is 2 x 3 inches at 2048 dpi. How many pixels in this image? Solution No. of pixels: 2048 x 2048 x 2 x 3 = 25,165,824 pixels Bitmapped Graphic Data

Bitmapped Graphic Data How to calculate file size Example An image is 2 x 3 inches at 2048 dpi and has a colour depth of 24 bits. What is the file size of this image? Formula File size (bits) = resolution (pixels) x colour depth (bits) 8 Or File size (bytes) = resolution (pixels) x colour depth (bytes) Solution No. of pixels: 2 x 3 x 2048 x 2048 = 25,165,824 pixels Colour depth: 3 bytes = 25,165,824 pixels x 3 bytes = 75,497,472 bytes = 75,497,472 bytes / 1024 / 1024 = 72 Mbytes. = 72 Mbytes File Size Bitmapped Graphic Data

Bitmapped Graphic Data How to calculate colour depth Example An image is 2 x 3 inches at 2048 dpi and has a file size of exactly 72 Mb. What is the colour depth of this image? Formula Colour depth (bits) = No. of bits resolution (pixels) Solution No. of pixels: 2 x 3 x 2048 x 2048 = 25,165,824 pixels No. of bits: 72 x 1024 x 1024 = 603,979,776 bits = 603, 979, 776 bits / 25, 165, 625 pixels = 24 bits per pixel = 24 bit colour depth Bitmapped Graphic Data

Bitmapped Graphic Data Dithering Dithering is a technique that creates an illusion of extra colours and shades by varying the pattern of dots. It has the effect of mixing colours together to improve the appearance or ‘gradation’ of colour. The image below has bands of colour instead of a gradual transition between colours. Colours reduced Dithered Bitmapped Graphic Data Applying dithering reduces the banding effect. Dithering is the most common method of reducing the colour range of an image such as a JPEG down to 256 colours (or less) such as an 8-bit GIF.

Dithering In Action 256 Colour 4 Colour Non-Dithered 4 Colour with Dithering

Bitmapped Graphic Data Anti-aliasing Anti-aliasing simulates extra resolution in an image to reduce its ‘blocky’ appearance. It has the effect of fooling the human eye into seeing straight lines and curves where there are none! No anti-aliasing With anti-aliasing Lets take a closer look: Before anti-aliasing After anti-aliasing Result Bitmapped Graphic Data Anti-aliasing shades pixels around an image using intermediate colours between the foreground and the background.

Bitmapped Graphic Data Anti-aliasing Bitmapped Graphic Data Both pieces of text have exactly the same resolution

Bitmapped Graphic Data Increase resolution - Resampling It is possible to increase the resolution of a graphic by ‘resampling’ it and reducing the effect of pixellation. Resampling is the process of adding colour to the new pixels created when an image is enlarged. Example A graphic, 100 x 100 pixels is rescaled by 400%, so now 400 x 400 pixels. Each pixel is replaced by 4 x 4 pixels so 16 times more of the same colour! 100 x 100 pixels 400 x 400 pixels After resampling Scale by 400% Resample Bitmapped Graphic Data Each additional pixel is given an individual and distinct colour which was found by calculating the average colour value of the four neighbouring pixels (a mathematical technique known as bicubic interpolation.). However, resampling is only a kind of ‘guesstimate’ and image will quality will be lost. Better to capture the image at a higher resolution in the first place!!

Bitmapped Graphic Data Graphics cards Graphics Processing Unit (GPU) A graphics card has its own GPU which can generate images faster and of better quality than the main processor and frees the main CPU from the load e.g. 3-D graphics require millions of calculations to be performed each time they are drawn! The graphics card has chips that convert analogue signals to digital signals, known as ADC / DAC. Bitmapped Graphic Data Digital Signal Processing (DSP) Processes the signal to remove noise/distortion/allows the addition of effects to be applied by the hardware.