CS110: Computers and the Internet Color and Image Representation.

Slides:



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

Madeleine Wright Peter Wentworth. » On your screen, or with light beams, colours are additive. » Each pixel is a mixture of Red, Green and Blue, the additive.
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,
Bit Depth and Spatial Resolution SIMG-201 Survey of Imaging Science © 2002 CIS/RIT.
Graphics in the web Digital Media: Communication and Design
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.
Russell Taylor Week 3. Image File Formats - TIF, JPG, PNG, GIF - which to use? The three most common and important image file formats for for printing,
Digital Colour Theory. What is colour theory? It is the theory behind colour mixing and colour combination.
Prepared by George Holt Digital Photography BITMAP GRAPHIC ESSENTIALS.
Digital Images The digital representation of visual information.
Lecture 3. Fundamentals of Computer Graphics. Computer Graphics, a very broad term Fields Related to Computer Graphics Bitmap/Vector graphics, 2D/3D graphics,
Color Names All standards-compliant browsers should handle these color names These color names can be used with the CSS properties of color and background-color.
Images and the Web web graphics. web graphics: constraints Due to the constraints imposed by varying degrees of Internet bandwidth, designing images for.
1 Ethics of Computing MONT 113G, Spring 2012 Session 11 Graphics on the Web Limits of Computer Science.
Faculty of Sciences and Social Sciences HOPE Website Development Graphics Stewart Blakeway FML 213
File Formats COM 366 Web Design & Layout. Native file format –Format native to software program –.psd > PhotoShop default Preserves layers –Use “Save.
Designing for the Unknown. Challenges of Web Design As frustrating as it may be – there is no guarantee that people will see/experience your web pages.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
Digital Images Chapter 8, Exploring the Digital Domain.
THE COLORS OF LIGHT RED, GREEN and BLUE
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.
Getting the Basics Graphics for the Web McIntyre, Period 2 Kellogg, Period 5.
Chapter 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.
1 Working with Cascading Style Sheet (CSS) (contd.)  What we will cover… 1. Color (decimal and hexadecimal representation) 2. Floating elements 3. Styling.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Foundations of Web Design I Photoshop CS5 Michael Daniel
Bit-Mapped Graphic Data: Input (Capture) Hardware Multimedia – Section 2.
© 1999 Rochester Institute of Technology Introduction to Digital Imaging.
Images The Science of Images What is an Image on the computer? The Psychology of Images What do we use images for? What effect color has on our mood and.
1 Web Developer Foundations: Using XHTML Chapter 4 Key Concepts.
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.
Communicating Quantitative Information Is a picture worth 1000 words? Digital images. Number bases Standards, Compression Will [your] images last? Homework:
Image Representation. Digital Cameras Scanned Film & Photographs Digitized TV Signals Computer Graphics Radar & Sonar Medical Imaging Devices (X-Ray,
Graphics An image is made up of tiny dots called pixels (“picture elements”) The resolution determines the.
Data Representation Robin Burke IT 130. Outline Data Representation Binary Numbers Image types.
Color and Images. Color The natural colors we see and the colors we see on computer monitors are different. CMYK -natural RGB -monitor.
Things to Remember When working with digital images.
Ch 6 Color Image processing CS446 Instructor: Nada ALZaben.
Images. Digital Images Rectangular arrays of pixel data Pixel - picture element, smallest addressable part of the frame buffer. Color depth - the depth.
Web Graphics. Web graphics Bandwidth is king Graphics must load quickly Graphics must be optimized All other components except for text, gif and jpg are.
Color Web Design Professor Frank. Color Displays Based on cathode ray tubes (CRTs) or back- lighted flat-screen Monitors transmit light - displays use.
Digital Images are represented by manipulating this…
1 Perception and VR MONT 104S, Fall 2008 Lecture 20 Computer Graphics and VR.
* Numeral Systems: A writing method for expressing numbers is called a “Numeral System". In the most common numeral system, we write numbers with combinations.
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.
HONR101 Analytics in a Big Data World Monday, January 18,
Vocabulary Worksheet Answers
Digital Graphics Vocabulary Texas State University CI5363 Florence Yang.
TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach.
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
Information in Computers. Remember Computers Execute algorithms Need to be told what to do And to whom to do it.
Computer Graphics Lesson 2 July 12, 2005 Image Formats What are some formats you are familiar with? There are 4 basic image format types: Uncompressed.
CC111 Lec#2 The System Unit The System Unit: Processing and Memory Lecture 2 Binary System.
Unit 2.6 Data Representation Lesson 3 ‒ Images
CS 115: Computing for The Socio-Techno Web
CNIT 131 Graphics.
Images Data Representation.
Image Processing Objectives To understand pixel based image processing
Sampling, Quantization, Color Models & Indexed Color
Binary Representation in Audio and Images
Computer Science Higher
How to Convert Pictures into Numbers
Binary 4 File Sizes.
Raster Images CPSC 1030.
CS 115: Computing for The Socio-Techno Web
Representing Images 2.6 – Data Representation.
MED 2001 Advanced Media Production
Web Programming– UFCFB Lecture 7
Presentation transcript:

CS110: Computers and the Internet Color and Image Representation

Today More information representation: Hexadecimal numbers Color representation Image representation Image compression

Standard Colors All standards-compliant browsers should handle these color names These color names can be used with the CSS properties of color and background-color : For other colors, it’s safest to use a numerical representation…

RGB Color The human retina has three kinds of color-sensitive photoreceptors that were traditionally called red, green and blue cones Visible colors can be created by adding different amounts of the three primary colors, red, green and blue Color monitors display colors by adding different amounts of red, green and blue light RGB color components are usually defined on a scale from 0 to 255 Over 16 million colors can be represented this way!

Explore RGB Color Deep PinkKhakiSteel Blue 1)What shades are created when all three primary colors are equal? 2) Look at the following colors: red, yellow (=red+green), green, aqua (=green+blue), blue, fuchsia(=red+blue) How can you make a color brighter or darker? 3) Create the following colors:

Color in CSS Specifying turquoise using rgb in CSS:

Hexadecimal Notation RGB decimal0-255 hexadecimal00-FF Numbers in the range are represented in base 16, using two “digits” that each have 16 values, drawn from 0..9, A..F ABCDEF decimal hexadecimal Converting decimal to hexadecimal: (1)Left digit: divide by 16, convert quotient to 0..9,A..F (2)Right digit: convert remainder to 0..9,A..F Converting hexadecimal to decimal: (1)Convert left digit to 0..15, multiply by 16 (2)Convert right digit to 0..15, add to (1) Example:  C9 16 (1)201/16 =  C 16 (2)remainder is 9 10  9 16 Example: A7 16  (1)A 16 is 10 10, 10*16 = 160 (2)7 16 = 7 10  = 167

Converting numbers In pairs: try the following conversions (you can use a calculator): DecimalHexadecimal

Hexadecimal Colors Using hexadecimal colors in CSS: R GB decimal0-255 hexadecimal00-FF blockquote { color: #9400D3; background-color: #E6E6FA; }

Image Representation Problem: large image files can take a long time to download! Example: On a 300 kbps (300k bits per second) cable modem, a 450 kB image takes about seconds to download Solutions: (1)Downsample images to make them smaller (fewer pixels) (2)Compress the images, using “lossless” compression (no information is lost) or “lossy” compression (less important information is lost) techniques RGB color for each pixel is stored in 24 bits (3 bytes) How much memory is needed to store a 300x500 pixel image?

Indexed Color indexcolor color paletteimage contents image indexcolor 00#0000FF 01#00FF00 10#FFFF00 11#00FFFF How large is a file that stores a 300x500 pixel indexed color image with 4 colors, and its color palette? (1)300x500 pixels, with 2 bits per pixel (why?) 300 x 500 x 2 = 300,000 bits (2) 4 colors, with 24 bits per color 4 x 24 = 96 bits  ~37.5kB (compared to the 450kB uncompressed file!) 2 bits per pixel 24 bits per color

Indexed Color How large is a file that stores a 300x500 pixel indexed color image with 16 colors, and its color palette? (1)What is the number of bits used to store the image pixels? (2) What is the number of bits used to store the color palette? Total file size (in bytes): “bits per pixel” is also called the “bit depth” bit depth must be large enough to store all of the colors bit-depthmax colors

GIF Indexed Color The GIF file format is an indexed color format that allows 256 colors (out of a possible 16 million colors!) Computing the file size for a GIF image, in bytes: (1)number of bytes to store the image pixels: (width * height * bit-depth) / 8 (2) number of bytes to store the color palette: num_colors * 3 (3) total number of bytes * : (width * height * bit-depth) / * num_colors (4) divide by 1,000 or 1,000,000 to convert to kilobytes or megabytes * There’s also a small amount of fixed overhead for storing file type, dimensions, etc.

Other Image Formats JPEG: wellesley.jpg - millions of colors, compressed, nice for photos, does not allow transparency PNG: cs110-logo.png - millions of colors, compressed, nice for line art and graphics, allows 8-bit transparency GIF: palette.gif - limited to 256 colors, nice for line art and graphics, allows 1-bit transparency, supports animation Generate all formats and compare with Fireworks!