TODAY STANDARD COLORS RGB COLOR CS 115: COMPUTING FOR SOCIO-TECHNO WEB REPRESENTATION OF TEXT, NUMBERS AND CODE

Similar documents
The BIOS in many personal computers stores the date and time in BCD. M-Mushtaq Hussain

RGB COLORS. Connecting with Computer Science cs.ubc.ca/~hoos/cpsc101

Q A bitmap file contains the binary on the left below. 1 is white and 0 is black. Colour in each of the squares. What is the letter that is reve

Data Representation. "There are 10 kinds of people in the world, those who understand binary numbers, and those who don't."

Unit 4.4 Representing Images

CS101 Lecture 12: Digital Images. What You ll Learn Today

1. Describe how a graphic would be stored in memory using a bit-mapped graphics package.

Introduction to Photography

PENGENALAN TEKNIK TELEKOMUNIKASI CLO

Digital Image Processing Lec.(3) 4 th class

CS 262 Lecture 01: Digital Images and Video. John Magee Some material copyright Jones and Bartlett

Introduction to Digital Imaging CS/HACU 116, Fall 2001 Digital Image Representation Page 1 of 7

Dr. Shahanawaj Ahamad. Dr. S.Ahamad, SWE-423, Unit-06

HTTP transaction with Graphics HTML file + two graphics files

Byte = More common: 8 bits = 1 byte Abbreviation:

How is Information Stored

15110 Principles of Computing, Carnegie Mellon University

Introduction to Multimedia Computing

ITP 140 Mobile App Technologies. Colors Images Icons

Lecture 2: An Introduction to Colour Models

UNIT 7B Data Representa1on: Images and Sound. Pixels. An image is stored in a computer as a sequence of pixels, picture elements.

Computers and Imaging

Lecture 9: Digital Images

UNIT 7C Data Representation: Images and Sound

Fundamentals of Multimedia

PB Works e-portfolio Optimizing Photographs using Paintshop Pro 9

Raster (Bitmap) Graphic File Formats & Standards

Unit 1.1: Information representation

LECTURE 03 BITMAP IMAGE FORMATS

15110 Principles of Computing, Carnegie Mellon University

BEST PRACTICES FOR SCANNING DOCUMENTS. By Frank Harrell

CS101 Lecture 19: Digital Images. John Magee 18 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

Computer Graphics: Graphics Output Primitives Primitives Attributes

Output Model. Coordinate Systems. A picture is worth a thousand words (and let s not forget about sound) Device coordinates Physical coordinates

Digital Imaging Rochester Institute of Technology

Image Optimization for Print and Web

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

SAQA. How to Submit an Online Entry. Art by Mary Kay Fosnacht

Adding some light to computing. Lawrence Snyder University of Washington, Seattle

Digital Imaging & Photoshop

Images and Displays. Lecture Steve Marschner 1

1 Li & Drew c Prentice Hall Li & Drew c Prentice Hall 2003

UNIT 7C Data Representation: Images and Sound Principles of Computing, Carnegie Mellon University CORTINA/GUNA

Introduction to Color Theory

Two Basic Digital Camera Types ( ) ( )

Color and Images. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 16

Chapter 8. Representing Multimedia Digitally

Digitizing Color. Place Value in a Decimal Number. Place Value in a Binary Number. Chapter 11: Light, Sound, Magic: Representing Multimedia Digitally

Bitmap Vs Vector Graphics Web-safe Colours Image compression Web graphics formats Anti-aliasing Dithering & Banding Image issues for the Web

Digital Media. Lecture 4: Bitmapped images: Compression & Convolution Georgia Gwinnett College School of Science and Technology Dr.

Image and video processing (EBU723U) Colour Images. Dr. Yi-Zhe Song

5/17/2009. Digitizing Color. Place Value in a Binary Number. Place Value in a Decimal Number. Place Value in a Binary Number

Course Objectives & Structure

Digital Files File Format Storage Color Temperature

MOTION GRAPHICS BITE 3623

COMPSCI 111 / 111G Mastering Cyberspace: An introduction to practical computing. Digital Images Vector Graphics

CHAPTER 2 - DIGITAL DATA REPRESENTATION AND NUMBERING SYSTEMS

COLOR AS A DESIGN ELEMENT

Color. Chapter 6. (colour) Digital Multimedia, 2nd edition

GUIDELINES & INFORMATION

raw format format for capturing maximum continuous-tone color information. It preserves all information when photograph was taken.

PHOTOSHOP. pixel based image editing software (pixel=picture element) several small dots or pixels make up an image.

Section 4.3. Other Bases. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

3.1 Graphics/Image age Data Types. 3.2 Popular File Formats

Indexed Color. A browser may support only a certain number of specific colors, creating a palette from which to choose

Learning Outcomes. Black and White pictures. Bitmap Graphics. COMPSCI 111/111G Digital Images and Vector Graphics

The worlds we live in. The worlds we live in

In order to manage and correct color photos, you need to understand a few

Images and Graphics. 4. Images and Graphics - Copyright Denis Hamelin - Ryerson University

ICT 514 Multimedia Systems Topic 2: Visuals: Static. Outline. What is the difference and why? Consider the following file formats. What do they mean?

Chapter 3 Graphics and Image Data Representations

Warm up Question: Question: 8-bit indexed colour uses 256 colours. Announcements. Overview of Today s Topics. Announcements GRAPHICS CONTINUED

TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES

Vector VS Pixels Introduction to Adobe Photoshop

Bit Depth. Introduction

Computer Science 121. Scientific Computing Chapter 12 Images

Image Perception & 2D Images

Color, graphics and hardware Monitors and Display

WordPress Users Group Manchester, NH July 13, Preparing Images for the Web. Daryl Johnson SvenGrafik

What is an image? Images and Displays. Representative display technologies. An image is:

Black & White and colouring with GIMP

Chapter 3 Graphics and Image Data Representations

Color image Demosaicing. CS 663, Ajit Rajwade

1. Using Images on Web Pages 2. Image Formats 3. Bitmap Image Formats

ENCODING COLOR IMAGES UNIT 3 LESSON 4

Photoshop CS6. Table of Contents. Image Formats! 3. GIF (Graphics Interchange Format)! 3. JPEG or JPG (Joint Photographic Experts Group)!

The next table shows the suitability of each format to particular applications.

Computer and Machine Vision

Digital images and image compression

Corporate Identity Quick Reference Guide

Preparing Images For Print

Welcome Back to Fundamentals of Multimedia (MR412) Fall, 2012 Chapter 3. ZHU Yongxin, Winson

Using Adobe Photoshop

Digital Imaging and Image Editing

Brief Introduction to Vision and Images

Additive Color Synthesis

Aperture. The lens opening that allows more, or less light onto the sensor formed by a diaphragm inside the actual lens.

Vision, Color, and Illusions. Vision: How we see

Digital photo sizes and file formats

Transcription:

TODAY Computer components Binary numbers Text representation Color representation ( THE CS 115: COMPUTING FOR SOCIO-TECHNO WEB REPRESENTATION OF TEXT, NUMBERS AND CODE 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: 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 For other colors, it s safest to use a numerical representation Over 16 million colors can be represented this way!

EXPLORE RGB COLOR 1) What shades are created when all three primary colors are equal? COLOR IN CSS Specifying turquoise using rgb in CSS: 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: Steel Blue Deep Pink Khaki FROM BINARY TO HEXADECIMAL Hexadecimal Notation R G B decimal 0-255 0-255 0-255 hexadecimal 00-FF 00-FF 00-FF Numbers in the range 0-255 are represented in base 16, using two digits that each have 16 values, drawn from 0..9, A..F decimal hexadecimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 A B C D E F 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 Example: 201 10 à C9 16 (1) 201/16 = 12 10 à C 16 (2) remainder is 9 10 à 9 16 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: A7 16 à 167 10 (1) A 16 is 10 10, 10*16 = 160 (2) 7 16 = 7 10 à 160+7 = 167

Hexadecimal Colors CONVERTING NUMBERS In pairs: try the following conversions (you can use a calculator): R G B decimal 0-255 0-255 0-255 hexadecimal 00-FF 00-FF 00-FF Decimal 7 26 255 Hexadecimal 240 100 Using hexadecimal colors in CSS: blockquote { color: #9400D3; background-color: #E6E6FA; } HOW ARE IMAGES REPRESENTED IN A COMPUTER?

B&W IMAGE REPRESENTATION An image is represented as a 2D array of pixels Its dimensions: say, w pixels wide by h pixels high DIGITAL IMAGES Images are often represented in a computer as a 2-dimensional (2D) array of pixels. Each pixel is a small square on the screen Resolution: How many pixels a screen can represent Each pixel has a color associated with it If the color can be either black or white, then one needs only 1 bit per pixel 1 = black; 0 = white Size of a B&W image: w * h * 1 bits = (w * h)/8 B A 640 x 480 BW image takes 38,400 B = 37.5 KB (1KB = 1024 B) 38 pixels high 44 pixels wide BIT DEPTH Since each color value is a number between 0 and 255 and we use 8 bits to represent such a number, we use 8+8+8=24 bits to fully represent all RGB colors How many different colors do we represent? 2 24 = Are they enough? Size of a true-color image: w * h * 24 bits = (w * h*24)/8 B A 640 x 480 color image takes 921,600 B = 900 KB! The number of bits used in an image is called the bit-depth For true-color, bit-depth is 24 But we can represent images using fewer colors (e.g., with smaller bit depth) 1 4 8 24 COMPRESSION FORMATS 24 bits (bit-depth) are enough to represent up to 16 million different colors A particular photograph, even though it may be very colorful, it may not need all 24 bits to be represented because it will likely not use all of them JPG is a compression format that allows the image to be stored using far fewer than 24 bits/pixel When we save an image as jpg we actually compress it. As a result, the quality of the image will degrade so that the compression image may lose some of its quality

INDEXED COLOR INDEXED COLOR 0 1 0 1 0 1 2 3 2 1 0 3 0 3 0 1 2 3 2 1 0 1 0 1 0 image image contents index color 0 1 2 3 color palette index color 00 #0000FF 01 #00FF00 10 #FFFF00 11 #00FFFF 2 bits per pixel 24 bits per color 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!) 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-depth max colors 1 2 2 4 3 8 4 16 5 32 6 64 7 128 8 256 LIMITED PALETTE IMAGE REPRESENTATION If we use a computer application (e.g., fireworks) to create a drawing, we likely are going to use far fewer than 16 million colors GIF is a image format that uses only 256 colors (it determines the best 256 colors for the image) A gif image uses only 1byte/pixel, plus the table to remember which particular 256 colors it uses (its palette )

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) / 8 + 3 * 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.