0% found this document useful (0 votes)
15 views

Graphical Language

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Graphical Language

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Milan Chikanbanjar Computer Department Computer Graphics

Chapter 4

Graphical Software
Graphical software is used to create images as well as processing the images to make it realistic. There are two
types of graphics software.
1. General Programming Package
2. Special Purpose Application Package.

1. General Programming Package:


This package provides set of graphics functions such as line, circle, polygon etc and these function can be used
in high level programming language such as C, C++ etc. These packages are specially designed for
programmers.

2. Special Purpose Application Package:


These programs are designed for non-programmers so that the user can generate displays without worrying
about how graphic operation works. Example: Paintbrush, CAD (Computer Aided Design).

Need for Machine Independent Graphical Languages


In Computer Science, a machine-independent program is any program that can be run by any computer, without
regard to its architecture or even its operating system.
 Primary goal of standardized graphics software is Portability.
 When packages are designed with standard graphics function, software can be moved easily from one
hardware to another.
 Without standards, program designed for one hardware often cannot be transferred to another system without
extensive rewriting of the programs. Thus Machine Independence Graphical language is required.
 National and International Standards Organization in many countries has cooperated in an effort to develop
generally accepted standards for computer graphics.

 Graphical Kernel System (GKS):


It was adopted as the first graphics software standard by International Standardization Organization (ISO) and
American National Standard Institute (ANSI).
Original GKS was 2D and later, 3D extension was developed.

 Programmer’s Hierarchical Interactive Graphics Standard (PHIGS):


It is an extension of GKS with increased capabilities for object modeling, color specifications, surface rendering and
picture manipulation. An extension of PHIGS called PHIGS+ was developed to provide 3D surface rendering
capabilities.
PHIGS doesn’t provide a standard methodology for a graphics interface to output devices not for storing and
transmitting pictures. So Separate Standards were developed.

 Standard graphics functions are defined as a set of specifications that is independent of any programming
language.

Direct X
 Direct X is a set of development libraries for high performance games under windows.
 It consists of:
a. Direct Draw: 2D graphics programming
b. Direct Sound: Allows mixing of sounds.
c. Direct Play: Allow multiplayer games to connect via modems, LANs etc.
d. Direct Input: Allow joysticks and handles input from various peripherals.
e. Direct 3D: 3D graphics programming.

1
Milan Chikanbanjar Computer Department Computer Graphics

Graphics file format


The command-based, GUI-based and scanned/digitized graphics can be stored in variety of file formats on a
computer disk (hard disk). The format of a stored graphic image directly affects the way it can be used or revised
later. For eg, when a file is stored as bit-mapped images, it only save “on/off” of pixel pattern. Bitmapped files are
commonly known in some systems as paint files. TIFF (Tagged Image File Format) files also store bit-map graphics,
but can include additional grayscale and color information. Other formats allow a graphics to be stored on disk as a
collection of one or more individually defined and editable ”objects”. Instead of storing actual graphic as a bit map,
the visual attributes of the graphic are stored as a group of mathematically defined objects. In this way, the graphic
is simply redrawn by the computer every time it is retrieved from disk to RAM. Almost all of the latest graphics
packages that use the GUI-based approach store the graphics in this way.
1. BMP (Window bitmap)
2. JPEG (Join Photographic Expert Group)
3. TIFF (Tagged Image File Format)
4. GIF (Graphics Interchange Format)

The following is the information coded in an image file:


1. Format/Version Identifier: Format being used including the version number.
2. Image Width and Height in pixels: It is given in number of pixels.
3. Image Type: Common type includes b and w, 8 bit color, 24 bit color etc.
4. Image data format: It specifies the order in which pixel values are stored in the image data selection. For
e.g.: left to right, top to bottom. The values of image data may be compressed by using compression
algorithm. E.g.: Run Length Encoding (RLE).

BMP (Window bitmap)


 Commonly used by Microsoft Window program and windows OS (operating System) itself.
 Here, Lossless Compression is specified but some use only uncompressed files.
 It is a binary file.
 It is pixel based format that only supports RGB color.
 Bit depth can be 1, 4, 8 or 24 bits.

GIF (Graphics Interchange Format)


 Not used for prepress application. It is more suit for web design or to exchange images through e-mails or
newsgroups.
 Most common on the web.
 It is limited to 256 colors.
 Since images with millions of colors are reduced to 256 colors, there is reduction in quality.
 GIF is best suited for images with few colors like chart, graphs, logos, icons etc.
 Photographic images with more than 256 colors should never be considered for GIF file type.
 GIF: uses lossless compression algorithm. There is no information loss.
 GIF : come in two flavors
o GIF87a: no animation
o GIF89a: supports animation
In summary GIF is: 8 bit + Compression + animation

JPEG (Join Photographic Expert Group)


 Stands for Join Photographic Expert Group which is a standardization committee.
 It is also stands for the compression algorithm that was invented by the committee.
 JPEG compressed images are often stored in a file format called JFIF (JPEF file interchange format) which
most people refer to as JPEG.
 JPEG: can have millions of colors.
 It uses lossy compression to make images smaller in size. So there is loss of image quality.

2
Milan Chikanbanjar Computer Department Computer Graphics

TIFF (Tagged File Format)


 It is standard for images that will be placed in desktop publishing programs.
 It can be neatly transported across platforms and compressed to reduce the file size.
 It is device independent so that it can be used on PCs, MACs and UNIX workstation.

PNG (Portable Network Graphics)


 Portable Network Graphic.
 Lossless Compression Approach. In lossless approach, the decoded (decompressed) copy is exact replica of
the original.
 It is used mostly in web application.

Graphics software:
1. Paint program:
Paint program works with bit map images.

2. Photo manipulation program:


It works with bit map images and is widely used to edit digitized photographs.

3. Computer Aided Design program:


CAD software is used in technical design fields to create models of objects that will be built or manufactured.
CAD software allows user to design objects in 3 dimensions and can produce 3-D frames and solid models.

4. 3-D Modeling Programs:


It is used to create visual effects. 3-D modeling program works by creating objects like surface, solid, polygon
etc.

5. Animation:
Computer are used to create animation for use in various fields, including games, and movies composing to
allow game makers and film makers to add characters and objects to scenes that did not originally contain
them.

Error Diagnostics:
Programming errors often remain undetected until an attempt is made to compile the program once the compile
command has been issued. However, the presence of certain errors will become readily apparent; since these
errors will prevent the program from being compiled successful some particular common errors of these types are
declaring constants and variables improperly, a reference to an undeclared variable and incorrect punctuation.
Such errors are referred as syntactical error or grammatical error. Most version of C program will generate a
diagnostic message when a syntactical error has been detected (the compiler usually come to an interrupt when
this happens). These diagnostic messages are not always completely straight forward in their meaning, but they
are nevertheless helpful in identifying the nature and location of the error.

Logical Debugging:
Syntactical errors and certain types of logical errors will cause diagnostic messages to be generated when
compiling or executing a program. Errors of these types are easy to find and correct. Some types of logical errors
can be much more difficult to detect, however, since the output resulting from a logically incorrect program may
appear to be error free. Moreover, logical errors are often hard to find even when they are known to exit (as for
example, when the computed output is obviously incorrect).

You might also like