Week 4 Flashcards

1
Q

What is a web server?

A

A computer that delivers (serves up) web pages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a client?

A
  • The computer that is requesting to
    see/visit the web page
  • Can be from different parts of the world
  • When they go to your webserver to look at your webpage, webpage gets downloaded onto their machine
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Give an ex of clients visiting a web server?

A
  • Many clients will visit one web server, for ex. 20,000 students might visit Western’s web server to see the page: http://publish.uwo.ca
  • We will put/post our web pages on the Western web server so clients can see our pages.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In order for webpage to get up on server, what needs to happen?

A

It needs to be uploaded

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the 3 advantages of a web server?

A
  1. Connected
  2. Always available
  3. Well maintained
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How is a web server being connected an advantage?

A

Computer is on all the time and connected to the Internet
(if computer is turned off, connection turns off)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How is a web server always available?

A

Since it never gets turned off, your website will always be available

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How is web server well maintained?

A

The people running the servers will take care of security and computer maintenance issues

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are examples of File Transfer Protocal programs?

A
  • WinSCP
  • FileZilla
  • Cyberduck – THIS IS A GREAT ONE FOR MAC USERS!
  • WS-FTP
  • Fugu (for Mac)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does an FTP program do?

A

It takes files from one folder and puts it on another folder
Normally takes it from your laptop and putting it on a webserver computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What 4 pieces of info needs to be given during an FTP transfer?

A
  • cs1033.gaul.csd.uwo.ca (webserver/name of computer)
  • Your userid (allows you onto computer)
  • Your password
  • Port 1033 (default is 22)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the permission settings for a file to be visible to everyone on internet?

A

Upside down U or 0755

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you set permissions for file settings not be visible to everyone on internet?

A

Uncheck others or 0750

  • File is still there but ppl on internet can’t see it anymore
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are 2 ways to do a file transfer in FTP?

A
  • Right click and create new folder
  • Drag and drop folder from remote side
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is an important step when handing in an assignment with FTP?

A

Checking if your link works

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the 2 big ideas for week 4 lecture?

A

1: Size Matters –> Squishing is important in computer science!
2: Gif vs Jpg vs Png –> Make the right choice!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How many ways are there to do compression and what does it depend on?

A

Several different ways to do compression depend on the type of image

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What do you have to consider when choosing to use a lossy method?

A

Are you willing to do a lossy compression and lose some of the original information?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is an example of packing a suitcase that relates to compression methods?

A

A. Folding carefully and sitting on the case! = Lossless
B. Leaving some unimportant stuff at home and using a smaller case! = Lossy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

How can you do compression for images with large blocks of the same colour?

A

Co-ordinate system and breaking image into blocks

Lossless compression (not losing quality, still storing info on every pixels colour)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How does a raw file store
images with large blocks of the same colour?

A

Ex. 100 pixel x 200 pixel yellow rectangle with 30 by 30 green square

We would have to store info about
20,000 pixels. We need to store the color of every pixel (24 bits or 3 bytes)=60,000 bytes of info

A RAW stores the information about each pixel, one at a time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

How can you do compression for images with large blocks of the same colour using a coordinate system and breaking it into blocks?

A

Split block up into large sections using coordinates to distinguish those sections and their size

Store:
startx= | byte
starty = I byte
endx = 1 byte
endy = I byte
color = 3 byte
Each shape: record 7 bytes
Multiply by 5 shapes = 35 bytes!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Why does the method of using coordinates with big blocks of colour well and when is it effective?

A

35 bytes vs 60,000 bytes! (in lecutre example)

Works great with rectangular shapes but gets a lot more complicated when curves are involved!

GIF compressions are, in reality, a lot more complicated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Compression aids with making smaller file size helps to do what faster?

A

Downloads faster images

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What are examples of pattern compression ideas?
- Look for patterns, for example: 14345 14345 14345 - If “1” represents pattern 14345, compresses it to “111” - Build a decoding hash table ◦ 0 13245 ◦ 1 14345 ◦ 2 23423 ◦ 3 11223 Pattern: 13245 23423 14345 11223 23423 Based on table will map to 02132
26
How many bytes is each letter represented by in ASCII code?
8 bits or 1 byte
27
How can words be compressed?
Huffman Coding
28
Which letter is the most common letter in the English language?
E
29
How can Huffman Coding be used as a compression method for text?
Rather than ASCII (each letter is 8bits or 1 byte) use the least number of bits for common letters and more bits for less common letters Ex: letter E is 3 bits letter Z is 11 bits
30
How did Huffman figure out which bits to use for what letters?
With a tree to figure out which branch to go down to get the correct bits to represent a letter
31
How many bytes will the word “see” be in ASCII? in Huffman?
ASCII: 24 bits Huffman: 10 bits
32
How many bytes will the word “zoo” be in ASCII, in Huffman?
ASCII: 24 bits Huffman: 19 bits
33
When is Huffman code used?
To save space when you need dictionary for spell check program
34
Which one looks more different from the original image, brightness adjusted slightly or colour adjusted slightly?
Brightness. Scientists have found that humans will notice changes in brightness more readily/easily than changes in colour
35
What different fields of studies is the JPEG compression algorithm an overlap of?
An example of how Biology and Computer Science and Physics overlap
36
What is the JPEG compression algorithm?
If it finds two adjacent pixels with very similar colors, it will store both those pixels with the same color and discard the other color. Don't touch brightness
37
How do we pick the most appropriate file format (GIF, JPG, PNG)?
Depends on what type of image we are representing, determines best file format to use - How many colours are needed for the first image? - How many for the second image?
38
What are the 3 file formats used for compression?
1. GIF 2. JPG 3. PNG
39
How does a a GIF (Graphic Interchange Format) work?
Looks for large blocks of area that all have the same colour
40
How popular is GIF and is it cross platform?
- Widely used on the World Wide Web - Cross Platform (works on Macs, Windows
41
How many colours does GIF support?
ONLY supports 8 bit colour! 2^8=256 colours
42
What type of media should GIF be used for?
Not great for photographs (ex. sunset with lots of different colour shades) but good for clipart, logos, animation
43
What happens to the colours and information when saving an image as a GIF?
Saving an image with 24 bit colour as a gif will lower the quality the first time you convert it to a gif (separate process) = lossy Once you convert it= lossless
44
What type of format does GIF produce smaller file sizes than?
Produces smaller file sizes than jpgs
45
How does GIF do lossless compression?
Image that's 200 x 200 pixels  If the original image had 256 colours or less ◦ With no compression the file size would be: 200*200*3/1024 = 117 KB ◦ Save as a GIF:  With 256 Colours = 8.4 KB  With 16 Colours = 5 KB  NOTICE: NO CHANGE IN QUALITY, LOSSLESS COMPRESSION!
46
Why are GIF's not great for photography?
Because can only store 256 colours.
47
What is one colour transparency in GIF's?
- Allows for transparency of ONE colour - Background will show through - Make GIFS of any shape (still rectangular but because its transparent it looks like a diff shape)
48
What is an issue with one colour transparency?
- Because you can only choose one colour to be transparent, areas that you may not want to be transparent will still become it if it's the colour you chose to be see through
49
Why are GIF's good for animation?
- Allows for animation - Don’t need a plug in for gif animation! - Works in all browsers, universal format! Try to keep as small short animation or else file size gets too big
50
What do you think a program, that converts images into gifs does, if the image has more than 256 colors?
Solution 1: Substitute one of the colors you have for one of the colors you are missing Solution 2: "Mixes" colours together to trick eye into seeing different colour?
51
What is dithering?
- Gifs allow for dithering - Juxtaposing (place side by side) pixels of two colors to create the illusion that a third color is present (grainy look)
52
How can you control the amount of dithering done?
Can reduce the number of colors in a GIF and choose options to control the way colors dither in the application or in a browser.
53
How have different computer scientists created different algorithms for dithering?
Dedicate their studies on using a different patterns on how colours are placed (different algorithms) to try and get the best picture
54
Why is dithering an effective tool?
- Reduce file size - AND make picture look quite good (not as good quality as original but does help a lot)
55
What does interlacing affect?
- Used for GIFS - How images are downloaded to your screen
56
What is the benefit of 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)
57
What is interlacing?
A process by which the image is drawn in a series of passes rather than all at the same time (file size bigger) Still takes same time to download but downloads differently by skipping lines
58
How can colour reduction reduce file size in GIFs?
256 = 28,483 KB 128 = 23,141KB= 19% reduction 64 = 19,488KB= 32% 32 = 15,903KB= 44% 16 = 11,863KB= 58% 8 = 8,886KB= 69%
59
What does GIF stand for?
(Graphic Interchange Format)
60
What does JPG stand for?
Joint Photographic Experts Group
61
What can JPG be used on?
- Widely used on the World Wide Web - Cross Platform (works on Macs, Windows)
62
Up to what colour depth can JPG support?
24 bit = over 16 million= true colour
63
What are the main differences between GIF and JPG relative to colour and file size?
Larger file sizes than GIFs BUT allows for a full colour scheme!
64
What types of media are JPG good for?
Good for photographs, computer games, screenshots, stills from a movie, etc because it supports 24 bit colour depth
65
What types of colour is JPG best for?
- Best for blends of color, softer shadow effects, subtle changes in color
66
What is JPG not good for?
Not good for well-defined lines or sharp contrasts between colours such as clip art Doesn't like edges= wants to smooth everything out into continuous colour
67
What type of compression does JPG do?
JPG does a lossy compression: - Discards more data about colours than about brightness - Not all of the information in the og image is preserved – not the same as the original - Degrades the image quality
68
Is JPG compression achieved?
By ‘forgetting’ certain details about the image, which the JPG will then try to fill in later when it is being displayed
69
How does the degree of info LOST vary in JPG?
Be varied by adjusting compression parameters. (controlled by you)
70
Why should you save as jpg file when ready with final product?
Because image data is lost with each compression, work with the image in native format and save only when you're done (try to keep as much quality as you can when working, rather than losing quality each time you save)
71
In JPG, quality of image is ______ proportional to amount of compression
Inversely - A higher image quality setting (has a lower compression value) results in less data being discarded. - Small file = low quality
72
What are some drawbacks of JPG compared to GIF in terms of features that GIF's have that JPG doesn't?
- No Transparency - No Animation - No Interlacing - No dithering
73
Why does JPG not allow dithering?
Because JPG allows for 16 mil+ colours, meaning you have full colour palette available to you so there's no purpose in dithering, you don't need to create new colours you already have them
74
How is PNG pronunced?
Ping
75
Why was PNG created?
Created specifically because of licensing issues with GIFs in the 90s
76
What type of compression does PNG use?
LOSSLESS compression
77
What are the 3 different versions of PNG?
◦ PNG-8 ◦ PNG-24 ◦ PNG-32 The numbers represent the colour depth
78
How is PNG-8 similar to GIF?
- Similar to GIF - Only allows for 256 colours - Allows for 1 transparent colour
79
How does PNG-8 differ from GIF?
- Storing of colours is more efficient in PNG files than GIFS thus, PNG-8 files might be SMALLER than their GIF counterparts (this is software dependent)
80
What are the benefits of PNG-24 (and PNG 32)?
 Allows for 24 bit colour  It is LOSSLESS  Allows for transparency on each pixel, with different levels of opacity
81
How does PNG 32 offer opacity?
PNG 32 allows for a full palette with full transparency (full 24 bit colour and extra 8 bits for transparency)
82
How does PNG-24 offer opacity?
If you want varying levels transparency, you will lose some colours
83
If I take the same image and save it (same quality level) as JPG file, then as a PNG24 file, which file size will be smaller? (keep in mind that jpgs are lossy and pngs are lossless)
- JPG will almost always have smaller file size than PNG 24 because they lose info about image - Gets rid of some details = better compression
84
What is a major benefit of PNG's lossless method?
- Never lose any of the original info - Don't lose og colours - Always get back original quality
85
What are things to think about when working with images?
- How big do I need it to be within my page - Will I ever need to print the page - What type of picture is it: cartoony or photography, how many colours - Will I need 1 colour to be transparent - Will I need varying levels of transparency in my photo
86
What does the question "how big do I need it to be within my page" determine?
Determines the Width Pixels by Height Pixels, try to make it as few pixels as possible (but appropriately sized for use)
87
What does the question "will I ever need to print the page" determine?
Determines the DPI
88
What does the question "what type of picture is it: cartoony or photography, how many colours" determine?
Determines GIF vs JPG
89
What does the question "will I need 1 colour to be transparent" determine?
Determines GIF/PNG vs JPG
90
What does the question "will I need varying levels of transparency in my photo" determine?
Determines JPG vs PNG 24 or 32