Lecture7 PDF
Lecture7 PDF
the computer
Fonts
• Font – the particular style of text (physical appearance).
The shape of a font is determined by its font name
Courier font
Helvetica font
Palatino font
Times Roman font
How?
• To simplify it let's assume that A4 is 8 inches x 12
inches(Actually it is 8.27 x 11.69 inches).
File size is determined by the number of pixels so the aim
is to find out how many pixels the image contains. Since
the resolution is 300 dpi, it means that each inch is 300
pixels across. As the image is 8 inches wide that means
there are 2,400 pixels in width (8 x 300). Likewise, as the
image is 12 inches long, the image is 3,600 pixels in length
(12 x 300). To get the total we multiply the breadth by the
length and the answer is 8,640,000 pixels (2400 x 3600).
• Assuming this is a grayscale image and we know that for a
grayscale image each pixel is 8 bits or 1 byte in file
size. So in total the A4 image of 8,640,000 pixels has a file
size of 8,640,000 bytes or about 8.2 MB
• In RGB colour this would be a 24 MB image.
-Alternatively Use a page description language. This is a form
of programming language for printing.
-sends a description of the page to be printed rather
than its bitmap image,
-The idea is that the description of a page is far smaller
than the associated bitmap, reducing the time taken to
send the page to the printer.
-Contains instructions for curves, lines, text in different
styles, etc.
• Typical resolutions
• from 600–2400 dpi
Scanners (ctd)
Used in
– document storage and retrieval systems, doing away
with paper storage. Electronic storage can be cheaper,
more reliable and more flexible
Optical character recognition
• Optical character recognition (OCR) is the process
whereby the computer can ‘read’ the characters on the
page.OCR converts bitmap back into text
• Current software can
recognize ‘unseen’ fonts
and can even produce
output in word-processing
formats, preserving super-
and subscripts, centering,
italics and so on.
-> Still not perfect.
virtual memory
• Problem:
– running lots of programs + each program large
– not enough RAM. Windowed systems will run several
applications simultaneously, soon using up many
megabytes. Operating systems handle this by paging
unused bits of programs out of RAM onto disk, or
even swapping the entire program onto disk.
• Solution - Virtual memory :
– store some programs temporarily on disk
– makes RAM appear bigger
• But … swapping
– If we select a window, and the relevant application
happens to be currently swapped out onto the disk, it
has to be swapped back in. The delay this causes can
be considerable, and is both noticeable and annoying
on many systems.
Compression
• compression techniques can be used to reduce the
amount of storage required for text, bitmaps and video.
• lossless
– recover exact text or image – e.g. GIF, ZIP
– Text can easily be reduced by a factor of five and
bitmaps often compress to 1% of their original size.
– look for commonalities.e.g
• text: AAAAAAAAAABBBBBCCCCCCCC
10A5B8C
-For video, in addition to compressing each frame, we
can take advantage of the fact that successive frames
are often similar.
We can compute the difference between successive
frames and then store only this
lossy
-we cannot recover original – e.g. JPEG, MP3 exploit
perception
JPEG: lose rapid changes and some colour.
-exploits properties of human vision to eliminate
information that is difficult to distinguish
-degree of compression can be adjusted, allowing a
selectable tradeoff between storage size and image
quality.
Storage formats - text
• The basic standard for text storage is the ASCII
(American standard code for information interchange)
character codes.
• ASCII - Assign to each standard printable character
and several control characters an internationally
recognized 7 bit code (decimal values 0–127). Many
systems extend the codes to the values 128–255,
including line-drawing characters, mathematical symbols
and international letters.
• Unicode- It is a 16 bit extension, the UNICODE
standard, which has enough room for a much larger
range of characters
• RTF (rich text format)
- most common shared format is rich text format
- text plus formatting and layout information
- regards the document as formatted text, that is it
concentrates on the appearance
Storage formats - media
• Images:
– The stored image needs to record the size of the
image, the number of bits per pixel, possibly a color
map
– many storage formats :
( GIFF, JPEG, PNG, etc.)
– plus different compression techniques
(to reduce their storage requirements)
– Given the range of storage standards (or rather lack
of standards), there is no easy advice as to which is
best.
• Audio/Video
– again lots of formats :
(QuickTime, MPEG, WAV, etc.)
– compression even more important
– also ‘streaming’ formats for network delivery
Limitations on interactive
performance
There are several factors that can limit the speed of an
interactive system:
Computation bound
– Computation takes ages, causing frustration for the user
– The system should be designed so that the user gets some
idea of how the job is progressing.
– This can be achieved by having a counter or slowly filling
bar on the screen that indicates the amount done, or by
changing the cursor to indicate that processing is occurring.
Storage channel bound
– Bottleneck in transference of data from disk to memory
– Trade off memory against processing speed. For example,
compressed data take less space to store, and is faster to
read in and out, but must be compressed before storage
and decompressed when retrieved. Thus faster memory
access leads to increased processing time.
– For many interactive systems the ability to browse quickly
is very important, but users will accept delays when saving
updated information.
Graphics bound
– Common bottleneck: updating displays requires a lot of
effort - sometimes helped by adding a graphics co-
processor optimised to take on the burden
Network capacity
– Many computers networked - shared resources and files,
access to printers etc. - but interactive performance can be
reduced by slow network speed