Documente Academic
Documente Profesional
Documente Cultură
Lecture #4
GRAPHICS continued
Lecture Today
#1 ________
#1 _________
#2 _________
#2 __________
( doesn’t matter ) DOWNLOAD
SPEED
On the Web it's survival
of the fastest...
… Don't make me wait!
1672 Seconds
or 28.66
Minutes
EXAMPLE 1: EXAMPLE 2:
PROBLEM:
-Image size isn’t appropriate
-Doesn’t look good
-But Downloads fast because it is small
SOLUTION:
-choose the appropriate size needed
- and then use ___________________
Image Optimization
OPTIMIZE IMAGES for the Web!
Optimization Techniques:
1. FILE FORMATS ____________________________
2. COMPRESSION ____________________________
But …
FILE Formats acceptable on web Which format is the
• .gif best for the Web?
• .jpg, .jpeg
Quality, download
• .png
speed
Image Optimization
File Format- .gif
.gif
.GIF Properties:
• Graphics Interchange Format
• Common image format used on the internet
• Cross platform
• Saving an image with 24 bit colour as a gif will lower the .jpg
quality the first time you convert it to a gif
Instructions on how to
make this one in Photoshop
Image Optimization
File Format- .jpg
.gif
.JPG, .JPEG
• Joint Photographic Experts Group
• Common image format used on the internet
• Cross platform
1. .jpg -
2. .gif -
Image Optimization – Compression
CHOOSE a COMPRESSION
TECHNIQUE
appropriate for the web
A Real World
Example of
Role of Compression is to:
Compression
• Reduce the redundancy of the image
:
data in order to be able to store or
http://www.yo
transmit data in an efficient form
utube.com/wa
• Compress as much as you can
tch?v=I5eypkl
WITHOUT sacrificing Quality
yjiY
(by losing bits information)
Image Optimization: Goal:
Reduce file
COMPRESSION TECHNIQUES size
NO INFORMATION IS _________
Image Optimization: Goal:
Reduce file
COMPRESSION TECHNIQUES size
.GIF .JPG
•“_________” compression •“_________” compression
• No data is discarded •Data is discarded
during compression each time file is compressed
•QUALITY IS KEPT •QUALITY DEGRADES
Image Optimization:
COMPRESSION TECHNIQUES - Lossless
Goal:
GIFs – “Lossless “ compression Reduce file
does not get blurry or messy size
NO DISCARD
OF DATA
SAVE SAVE
& RE-OPEN & RE-OPEN
Image Optimization:
COMPRESSION TECHNIQUES - Lossless
95% compression
(=lower quality) HIGH
When saving a JPEG image, you can select the 95% compression
= 5% quality
quality or compression ratio of the final image
. JPG
Recap….
Goal:
Optimization Techniques: Reduce file
size
10 sec 6 sec
4 sec 3 sec
Image Optimization:
COLOR RESOLUTION
IF CHANGE
BIT DEPTH
ORIGINAL 8-> 5 BITS
Break Time
http://youtube.com/watch?v=Fr8UpG
1xnWs
34
Optimization Techniques
TO Reduce FILE SIZE
.GIF .JPG
• Compression (Lossless) • Compression (Lossy)
• Color resolution • Image Quality
36
Dithering Technique - .gif
http://en.wikipedia.org/wiki/Dither
38
Dithering Technique - .gif
39
How does dithering work?
Dithering Definition:
Juxtaposing (place side by side) pixels of two colors to create
the illusion that a third color is present (grainy look)
http://www.colorcu
be.com/illusions/dit
her.htm
Assume our image uses this orange outside of web safe pallette
41
How does dithering work?
.gif
Benefits:
Interlacing lets you
have a feel for the
whole picture, you
don’t have to wait
around to see it
download (good for dial
up connections)
Transparency- .gif Transparent
Every pixel in the
Applies to .GIF files image is either
allows the page background to display completely visible
through the image so the image appears to or completely see-
have no visible border around it. through so that
Allows for transparency of _______colour what's "underneath"
Currently the only formats that support the image shows
transparency are the GIF and PNG formats. through
PNG Files
Pronounced PING
Created specifically because of licensing issues with
GIFs in the 90s due to legal issues resulting from GIFs
compression scheme
Does ____________ compression – No Discard
Two versions of PNG
PNG-8
PNG-24
JPEG true color PNG 24-bit true color PNG 8-bit 16 colors
6,549 bytes 64,020 bytes 12,704 bytes
Transparent
.PNG 24 Every pixel in the image
is either completely
visible or completely
see-through so that
what's "underneath" the
image shows through
Translucent
Pixels can be ________
__________, to create a
ghostlike, partially see-
through effect.
Image Optimization – Format Characteristics
Explore
Capturing images from
Scanner
Digital Camera
Viewed on a monitor
Capturing Digital Images
- Scanning -
Where do we get our images
to use on our computer?
Scanner, Digital Camera, and
Drawing
HOW?
Converting from Analog to Digital Samples on scanners
are measured as
The scanner or the camera determines
how many samples to take (how finely dots per inch (dpi)
to break down the images) (you specify this value)
More samples, the higher the 100 dpi, 300 dpi, 600 dpi
resolution will be. etc.
Capturing Digital Images - Scanning -
So how many samples do we get
when we scan?
# of samples: # of samples:
=(8”*100dpi) * (10”*100dpi) =(8”*300dpi) * (10”*300dpi)
= 800*1000 = 2400*3000
= 800,000 samples = 7,200,000 samples
(almost 1 million samples)
If we print the scanned image,
what will the print size be?
If scanned image is: 600 ppi (dpi)
3600 x 2400 pixels 3600 pixels/600ppi = 6 inches
2400 pixels/600ppi = 4 inches
FORMULA:
(Physical image size is dependent on) 300 ppi (dpi)
Print Size Dimensions (in inches)
=____________ / ____________ 3600 pixels/300ppi = 12 inches
2400 pixels/300ppi = 8 inches
Print resolution
Image size (larger)
How to set dpi for printing
In Photoshop:
1. Image >Image Size
2. Deselect “Resample Size”
3. Change the Resolution
http://www.rideau-info.com/photos/changedpi.html
56
Capturing Digital Images
- by Camera -
Example: Kodak DCS 460/660 can capture 3072 by 2048 pixels for one photograph
about 6 million pixels or about 6 megapixels (3072 X 2048 = 6,291,456 px)
1,000,000 pixels
= 1 Megapixel
Capturing Digital Images
- by Camera -
Megapixel: Relationship:
• how many millions of pixels you can
capture in a photograph on your digital Higher resolution
camera Larger Image (pixels)
describes the _______ size of an image Better image quality
(width x height) Bigger prints
Higher
Resolution:
1600 x 1200
• Everything
appears smaller
1600 px 1024px
Displaying images on a screen
Example:
If Image is 300 pixels by 200 pixels
200
(1/4 x 1/5 = 1/20 ) 300
<--
Then image will take up 1/20 screen <-------- 640 px ------ >
(1/2 x 1/2 = ¼ )
Then image will take up 1/4 of the
screen 200 300
<--
<-------- 1280 px ------
REVIEW
CS1033 Pixel and Resolution
Answer:
Answer:
Answer:
px --- >
<----- 600
300
400
<-------- 800 px ------ >
5. Draw the same image that is 400 px by 300 px,
roughly draw it on the following monitor that has a
resolution that is 1600 by 1200 pixels (put the bottom
left corner of the image in the bottom left corner
of the screen)
Answer:
px --- >
px --- >
--1200
300
300
--600
400 400
Answer:
Answer:
FORMULA is: (pixels inches)
Print Size Dimensions(in inches)
=pixel dimensions /print resolution
Answer:
___________________________
If 1024 bytes = 1 KB
Then 270,000 / 1024 =263.67 Kilobytes (KB)
9. How many Megapixels is an image
that is 2000px by 3000px?
Answer:
Image size = 2000px x 3000px Fact:
= 6,000,000 px ________________
= _______ MB
10. To calculate the number of bytes an uncompressed true colour
image (raw) will be, you multiply the width pixels by the height
pixels by 3 bytes (1 byte for the red= 28bits,1 byte for the green =
28bits, 1 byte for the blue = 28bits,). This is called a .raw file.
Based on the above formula, how many bytes would an image in
.raw format be if it was 200 pixels by 300 pixels:
Answer:
Uncompressed file size (assume 24bit depth)
= (image dimensions) x (<R,G,B> bits)
= 200 * 300 * 24bits
= 200 * 300 * 3 bytes = 180,000 bytes
If 1024 bytes = 1 KB
Then 180,000 / 1024 =175 Kilobytes (KB)
(to make it easier- round up 180,000/1000 = 180 KB