Computer Science Higher

Slides:



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

Bitmapped Graphic Data
ISYS 3074 Graphics File Formats File formats have developed with applications. At least 50 currently in use. Examples include: GIF, JPEG, TIFF, BMP, DIB,
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.
An Introduction to Scanning and Storing Photographs and Graphics Bryn Jones Aug 2002
Higher Computing Data Representation.
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.
Image Storage Bitmapped Graphics – in which an image is represented as a collection of dots Vector Graphics – in which an image is represented as a set.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Higher Computing Computer Systems S. McCrossan 1 Higher Grade Computing Studies 1. Data Representation Data Representation – Why do we use binary? simplicity,
Data Representation The method of data representation in a computer system depends upon the type of data which is being used. Three types of data are considered.
7/11/20081 Today’s Agenda Friday 6 th Nov Revision of certain topics Floating point notation Excess Notation Exam format Interim Report.
Graphics and Images Communicating Information : Documents and Publications.
Image Representation. Objectives  Bitmaps: resolution, colour depth and simple bitmap file calculations.  Vector graphics: drawing list – objects and.
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.
© De Montfort University, Vector and Bitmapped graphics Howell Istance School of Computing De Montfort University.
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:
Marr CollegeHigher ComputingSlide 1 Higher Computing: COMPUTER SYSTEMS Part 1: Data Representation – 6 hours.
Graphics An image is made up of tiny dots called pixels (“picture elements”) The resolution determines the.
Int 2/ Higher - Data Representation - 1 Why use Binary? It is a two state system (on/off) which makes it simple to operate Even if degradation of current.
Data Representation The storage of Text Numbers Graphics.
Computer Systems Nat 4.5 Computing Science Data Representation Lesson 4: Representing and Storing Graphics EXTENSION.
Raster Graphics 2.01 Investigate graphic image design.
Digital Images are represented by manipulating this…
 By Bob “The Bird” Fiske & Anita “The Snail” Cost.
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.
Image File Formats Harrow Computer Club – Wed, 1 Dec 2010 Bob Watson MA CMath MIMA MBCS.
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
Information Systems Design and Development Media Types Computing Science.
Software Design and Development Storing Data Part 2 Text, sound and video Computing Science.
ITEC2110, Digital Media Chapter 2 Fundamentals of Digital Imaging 1 GGC -- ITEC Digital Media.
Computer Systems Nat 5 Computing Science Data Representation
Unit 2.6 Data Representation Lesson 3 ‒ Images
BITMAPPED IMAGES & VECTOR DRAWN GRAPHICS
File Compression 3.3.
Images Data Representation.
Data Representation.
Computer Systems Nat 4/5 Data Representation Lesson 4:
Binary Representation in Audio and Images
How to Convert Pictures into Numbers
Graphics Bitmap Vector
BTEC NCF Dip in Comp - Unit 02 Fundamentals of Computer Systems Lesson 10 - Text & Image Representation Mr C Johnston.
Intermediate 2 Computing
2.01 Investigate graphic image design.
Learning Intention I will learn how a computer stores graphics.
GRAPHICS Source:
Digital Images.
Chapter 3:- Graphics Eyad Alshareef Eyad Alshareef.
File size and image quality
Graphics.
An Introduction to Scanning and Storing Photographs and Graphics
Data Representation.
Representing Images 2.6 – Data Representation.
Web Design and Development
Computer Systems – Unit 1
2.01 Investigate graphic image design.
Why use Binary? It is a two state system (on/off) which makes it simple to operate Even if degradation of current occurs (ie a slight drop in voltage)
Multimedia System Image
Computer Systems Nat 4.5 Computing Science Data Representation
Computer Systems Nat 4/5 Data Representation Lesson 4:
2.01 Investigate graphic image design.
2.01 Investigate graphic image design.
Presentation transcript:

Computer Science Higher Graphics Computer Science Higher

Lesson 4: Storing graphics Learning intentions To know how a computer stores graphics To know how a computer can reduce the size of graphic files Success criteria I can describe how computers store bitmap and vector graphics I can calculate the storage requirements of a black and white/colour graphic I can describe the advantages/disadvantages of using bitmap graphics over vector. I can describe how computers can reduce the size of graphic files using RLE, LZW lossy and lossless techniques.

Bitmap graphics A bitmap image is stored as a sequence of binary numbers, each number representing the colour of a pixel. A pixel is the most basic component of a computer graphic. The resolution is the number of pixels that make up the graphic. This determines the quality of the picture. high resolution = sharp picture

Black & white bitmap graphics Shown below is a representation of a very simple graphic

Black & white bitmap graphics To calculate the storage requirements of a black and white bitmap graphic we can follow the steps below. 300 dpi Calculate the number of pixels in the image ( 300 x 3 ) x ( 300 x 4 ) = 1080000 pixels 1 pixel = 1 bit so the image requires 1080000 bits. Convert to bytes 1080000 / 8 = 135000 Bytes Convert to kilobytes 135000 / 1024 = 131.84 kilobytes 3 inches 4 inches

Black & white bitmap graphics Try the following example 500 dpi ( 500 x 3 ) x ( 500 x 6 ) = 4500000 pixels 4500000 bits. 4500000 / 8 = 562500 Bytes 562500 / 1024 = 549.32.84 kilobytes 3 inches 6 inches

Colour bitmap graphics 00 10 01 11 Four colours are used in the graphic and so each pixel is represented using 2 bits. 00 bit for a white pixel, 01 for a blue pixel, 10 for a red pixel and 11 bit for a purple pixel.

Colour bitmaps How many colours could be represented using 3 bits? 000 001 010 011 100 101 110 111

Colour bitmap graphics The number of bits used to store the colour of each pixel is known as the bit depth or colour depth. In order to calculate the storage requirements of a colour graphic you must multiply by the colour depth. RGB colour codes are created by using 8 bits for each of the three primary colours (red, green and blue) then combining them to produce a 24 bit colour code. True colour bitmapping uses 24 bits per pixel (16 777 216 colours).

Bit depth These numbers feature in most exam questions where the number of colours in a system is used to calculate the amount of memory needed. Learn them Colours Bits 2 1 4 8 3 16 32 5 64 6 128 7 256 65536 16777216 24 (true colour)

Colour bitmap graphics The image below is 6 x 4 inches with a dpi of 300 and a bit depth of 16. Let’s calculate the file size. ( 300 x 4 ) x ( 300 x 6 ) = 2160000 pixels 2160000 pixels x 16 = 34560000 bits 34560000 / 8 = 4320000 bytes 4320000 / 1024 = 4218.75 kilobytes 4218.75 / 1024 = 4.11 megabytes

Colour bitmap graphics The image below is 8 x 5 inches with a dpi of 500 and a bit depth of 24. Let’s calculate the file size. ( 500 x 8 ) x ( 500 x 5 ) = 10000000 pixels 10000000 pixels x 24 = 240000000 bits 240000000 / 8 = 30000000 bytes 30000000 / 1024 = 29296.96 kilobytes 29296.96 / 1024 = 28.61 megabytes

Bitmap graphics Advantages Can be edited at pixel level File size remains the same no matter how complex the image is Disadvantages File sizes can be large Individual objects cannot be edited as bitmap graphics packages do not support layers. Pixelation can occur when a bitmap graphic is re-sized.

Vector graphics Vector graphics store the attributes of every object in the image (e.g. circle: centre x, centre y, radius, fill colour, line thickness, etc). This means that a description of how the graphic is to be drawn is stored rather than storing information on every pixel. This results in an image which can be re-sized without pixelation occurring). When the drawing is saved, only the list of objects and their attributes is stored which greatly reduces the file size. When the drawing is loaded the drawing package simply redraws all the objects.

Comparison of vector/bitmap graphics Manipulate at pixel level. Manipulate at object level. Typically a larger file size. File size is affected by resolution of image. Higher resolution = higher file size Typically smaller file size, file size increases as more objects are added to the graphic Becomes pixelated (blocky) when enlarged. Can be enlarged without affecting quality (resolution independent). Ideal for photos and realistic images. Ideal for simple logos on websites, etc.

Vector graphics Advantages Individual objects can be edited File size is generally small Graphics can be re-sized without pixilation occurring Disadvantages Can not be edited at pixel level Increasing complexity of an image results in increasing file size

Compression To reduce the file size of an image so that it is less demanding in terms of storage and memory use and to reduce the file size of an image to allow for faster transmission over a network. Lossless Compression None of the original data is lost. Methods are found to store the information in a more efficient way. e.g. Instead of 250 white pixels, you store 250 times white pixel Lossy Compression This method involves sacrificing some of the data that our eyes will probably not notice. e.g. Instead of using millions of colours we can just use hundreds. Therefore we only use 16 bits rather than 24 bits to represent the colour depth.

RLE Run length encoding is useful if there is a block of pixels in sequence that are the same colour. Take the following image for example: In this picture you may have 24 consecutive pixels which are green. If the bit depth was set at 8 bits per pixel then it would take 144 bits (8 * 24) to store the sequence. RLE would store the colour value once using 8 bits. It would then store the number 24 in binary – (11000). In total 16 bits would be needed to represent all 18 pixels if run length encoding were used. This form of compression is excellent when an image contains large sequences of the same colour.

LZW LZW compression will store patterns that are repeated in an index/look-up table. When a pattern is repeated the look-up table is referenced to create the sequence of pixels. For example, if the pattern shown below were present eight times in an image it would be stored once in the lookup table and an algorithm would be used to call the pattern from the lookup table eight times. Index 5 To use the pattern again the computer would just need to store the binary value for the number 5 (00000101) as this is the index value used to store the pattern.

Compression and file types BMP files use RLE GIF files use lossless LZW compression JPEG files use lossy compression by changing the colour of pixels to create larger areas of the same colour, leading to better compression. The level of compression can be adjusted to suit the necessary quality of an image. PNG files are lossless graphics files with support for better technologies for use online, such as streaming and interlacing. PNGs can also have transparent sections, and even semi-transparent sections. TIFF files are lossless graphics files that are often used by scanners and other high-resolution imaging devices.