Computer file formats - Vrije Universiteit Brussel

Download Report

Transcript Computer file formats - Vrije Universiteit Brussel

1
Computer file formats
[email protected]
• Vrije Universiteit Brussel
• Informatie- en Bibliotheekwetenschap,
Universitaire Instelling Antwerpen
België
Presented for the SAP project at
Katholieke Universiteit Nijmegen, Nederland,
10 May 2001
These slides are available through the WWW from
http://www.vub.ac.be/BIBLIO/nieuwenhuysen/presentations/
2
***-
Contents of this presentation
• Introduction to file formats
• File formats for text only
• File formats for graphics/images
• File formats for documents with text and images
• File compression, archiving, conversion
3
***-
Introduction to file formats
4
***-
The relations between
programs and file formats
Programs to edit/create/develop/maintain a file in a
particular format

File stored in a particular format

Programs to read/view files in a particular format
+ Programs to save=convert=export files from one format
to another
5
***-
The program functions
editing, viewing, converting
A program can incorporate only 1, 2, or all 3 of the
functions
• Editing / creating
• Reading / viewing / interpreting
• Converting / saving / exporting
for particular file formats.
***-Examples
Examples of programs
for editing, viewing, converting
Examples:
• Microsoft Word can create/edit + view/read + convert the
file in the formats DOC, RTF, HTML.
• Adobe Acrobat Reader can only view / read
(but not create/edit or convert/save) files in PDF format.
6
7
***-
File formats for text only
8
***-
File formats for text only:
examples
Type
Normal file name extension
• Files containing unformatted
ASCII text
.TXT
• Files with text coded by the
Hypertext Markup Language
.HTML or .HTM
9
**--
!? Question !? Task !? Problem !?
Why can HTML files be considered as text only,
even when many web pages made with HTML
contain graphics/images/photos?
10
***-
File formats for graphics/images
11
**--
!? Question !? Task !? Problem !?
Explain the differences between
bitmap graphics
with vector graphics.
12
**--
Graphics formats:
bitmaps and vector graphics
• Bitmap graphics
used in programs for “painting”
• Vector-based graphics
used in programs for “drawing”
13
**--
!? Question !? Task !? Problem !?
Draw a small circle with a
paint program for bitmaps and save this.
Draw a small circle with a
draw program for vector graphics and save this.
Select each drawing and enlarge it.
What is the difference between the resulting drawings?
14
**--
Graphics formats: bitmaps
compared with vector graphics
Property
Bitmaps Vector graphics
•Suited for “painting”
and “retouching”
+
-
•Resolution adapted
to output medium
-
+
large
small
•Size of files
15
***-Examples
Graphics formats
for bitmaps only
File name extension Origin
BMP
GIF
JPG
PCX, PCC
PNG
RLE
TIF
...
Maximum number
of colours
Microsoft
CompuServe / Unisys maximum 256 colours
JPEG
more than 256 colours
Z-Soft Paintbrush
W3C
more than 256 colours
Aldus PageMaker
...
16
**--
!? Question !? Task !? Problem !?
Which properties of graphics file formats
for bitmap images are important?
17
Graphics formats for bitmap images:
a comparison
GIF
• Maximum number of colours in one image?
JPG
256 256*256*256
• Compression of file size?
+
++
• Compression without loss of quality?
+
-
• Animation possible?
+
-
18
**--
!? Question !? Task !? Problem !?
Estimate the typical size of a computer file
that contains a bitmap image in colours,
that has been obtained by using a typical scanner,
and that can cover a complete typical display
or projection screen directly
at optimal resolution without enlargement,
when no compression is applied.
19
**--Examples
Graphics formats
for vector graphics (+ bitmaps)
File name extension Origin
CDR
CGM
EPS
IMG
PPT or PPS
WPG
...
Corel Draw!
Graphics Metafile
Encapsulated PostScript
GEM
Microsoft PowerPoint
WordPerfect Graphics
...
20
**--
Graphics formats:
the problem of exchange
The differences in all the graphics file formats cause the
requirement of filter / conversion programs, when a
graphics file must be inserted in a document which is
managed by an application program which works
primarily with another graphics file format.
21
**--
!? Question !? Task !? Problem !?
Insert a picture, stored in a graphics file,
in a document
created by your program for word processing.
22
***-
File formats
for documents with text and images
23
**--
!? Question !? Task !? Problem !?
Which concrete file formats
for storage of documents
with text and images
do you know?
24
***-
Documents with text and images:
available file formats (Part 1)
• Many! Too many?
• Examples:
»formats of the various programs for word processing and
page design, in their various versions (DOC,…)
»Rich Text Format (RTF)
»PostScript (PS)
»Adobe Portable Document Format (PDF);
Catchword RealPage,...
25
***-
Documents with text and images:
available file formats (Part 2)
»bitmap-related format, primarily for graphics, but they can
also show characters:
BMP, GIF, JPG/JPEG, PCX, PNG, TIFF...
»SGML, HTML, XML,... considered here together with the
graphics files that they link to
»…
26
**--
!? Question !? Task !? Problem !?
Which properties of computer file formats
for storage of documents
with text and images
do you consider as important?
27
**--
Documents with text and images:
properties of file formats (Part 1)
• Is the format platform independent? (for instance usable
with software on Windows, Macintosh, Unix,…)
• Is the format not proprietary?
• Are files in this format small in comparison to the
corresponding files in other formats?
• Is compression applied? If yes, is this compression
without loss of information?
28
**--
Documents with text and images:
properties of file formats (Part 2)
• Are viewers (programs) for users easily available?
• Does the format allow text retrieval? Is the content of a
file in this format searchable on a microcomputer?
• Does the format allow text retrieval by common Internet
indexes? Is the contents searchable through the WWW or
through an intranet?
29
**--
Documents with text and images:
properties of file formats (Part 3)
• Can a file in this format be loaded in a program and be
edited / modified / improved and saved? (or can it only be
derived from a master file in another format?)
• Can the text be reformatted to another size or font?
• Can a selection be made from the displayed contents of a
file in this format, by copy or cut, to be pasted in another
document?
30
**--
Documents with text and images:
properties of file formats (Part 4)
• Does the format not suffer from the existence of various
versions that may confuse the users and that require an
appropriate, up-to-date program?
• Is the format suitable when hard-copy documents are
converted to computer-based documents?
• Is a program to produce the format already available or
not expensive?
31
**--
Documents with text and images:
properties of file formats (Part 5)
• Is the format ‘rich’, allowing to derive less rich formats
from a file in this format?
(for instance
from Microsoft Word to RTF or HTML or PDF,
from SGML to XML to HTML,...)
32
**--
!? Question !? Task !? Problem !?
Discuss the properties
(advantages and disadvantages)
of each important file format
TXT, DOC, RTF, PS, PDF, SGML, HTML, GIF, JPG, TIFF
for storage of documents with text and images?
Summarize this in the form of a table:
file formats versus their properties
33
**--
!? Question !? Task !? Problem !?
What is the main conclusion
of the overview of the properties
of file formats for storage of text and images?
34
**--
File formats:
the problem of exchange
The differences in all the file formats cause the requirement
of filter / conversion programs, when a file must be
viewed or edited by an application program that is not
exactly the same as the one used to create the file.
35
***-
File compression, archiving and conversion
36
***-
File compression, archiving and
conversion
• Compression
to make files smaller
• Archiving
to keep related
files together
• Conversion
for transfer
via computer networks
:&&”FclPBT#$-D
!3!!!%!&!!!!2’H#3)
!%!f”9’!)!!+8QpcF
37
***-
!? Question !? Task !? Problem !?
Which benefits are offered
by compression of files?
38
***-
Data compression:
benefits
• Storage capacity required on magnetic or optical disks is
smaller
• In data communication:
»transmission times are shorter
»transfer of less bits  less network congestion
39
**--
Data compression:
redundancy
Compression is (in many cases) based on the elimination of
redundancy present in the source data:
• Spatial redundancy:
repeated occurrence of the same text or picture elements
• Temporal redundancy:
occurrence of the same picture elements in subsequent
pictures
40
**--
Data compression:
lossless versus lossy
• Compression without loss of data / quality:
“lossless” compression
• Compression with loss of data / quality:
“lossy” compression
41
**--
!? Question !? Task !? Problem !?
Which concrete products,
tools and methods for file compression
do you know?
42
**--Examples
Data compression:
some CODECS
• Compression without loss of data, and archiving:
ARC, BOO, CAB, LHZ, ZIP, ZOO,...
• Lossless compression of bitmap graphics:
GIF, TIFF, ... in various versions
• Lossy compression of graphics with many colours:
JPEG, ... in various versions
• Lossy compression of video with sound:
AVI, MPEG, Quicktime, RM, ... in various versions
43
**--
!? Question !? Task !? Problem !?
Find a file in .ZIP format
and decompress it.
44
**--
!? Question !? Task !? Problem !?
Why is it not useful
to apply a compression procedure
like ZIP for instance,
to a video file
in formats like AVI or MPG?
45
**--
!? Question !? Task !? Problem !?
Which programs do you know
and which program do you use
to save images as JPEG files?
46
**--
!? Question !? Task !? Problem !?
Select or create an appropriate photograph bitmap file.
Save this file as a JPEG file under a different name.
Repeat this at about 3 very different
levels of compression and thus of image quality
(always starting from the appropriate original photo file,
because JPEG is a final storage format).
Load all the resulting photo files in a program to edit such files;
zoom in to 400% for instance;
use tiling to display the photo files simultaneously on the screen;
compare their quality.
Determine also the file size of each photo file.
Decide finally which compression level is appropriate or your aims.