Sie sind auf Seite 1von 29

GIF

GIF (Graphics Interchange Format) is a creation of CompuServe and is used to store


multiple bitmap images in a single file for exchange between platforms and systems.
In terms of number of files in existence, GIF is perhaps the most widely used format
for storing multibit graphics and image data. 
GIF uses LZW algorithm for data compression. It is lossless method of data
compression.
Type Bitmap

Colors 1 to 8 bit

Compression LZW

Maximum Image Size 64Kx64K pixels

Multiple Images Per File Yes


• Lempel–Ziv–Welch (LZW)
• The LZW algorithm is a very common compression technique. This
algorithm is typically used in GIF and optionally in PDF and TIFF. Unix’s
‘compress’ command, among other uses. It is lossless, meaning no
data is lost when compressing. The algorithm is simple to implement
and has the potential for very high throughput in hardware
implementations. It is the algorithm of the widely used Unix file
compression utility compress, and is used in the GIF image format.
• The Idea relies on reoccurring patterns to save data space. 
• LZW compression works by reading a sequence of symbols, grouping
the symbols into strings, and converting the strings into codes.
Because the codes take up less space than the strings they replace,
we get compression. 
TIFF
• TIFF (Tag Image File Format) is a common format for exchanging 
raster graphics (bitmap) images between application programs, including
those used for scanner images. A TIFF file can be identified as a file with a
".tiff" or ".tif" file name suffix. The TIFF format was developed in 1986 by
an industry committee chaired by the Aldus Corporation (now part of
Adobe Software).
• TIFF files are commonly used in desktop publishing, faxing, 3-D
applications, and medical imaging applications.
• TIFF files can be in any of several classes, including gray scale, color palette
, or RGB full color.
• It do not perform any compression on images have a high-quality image is
obtained but size of image is also large, which is good for printing,
professional printing.
PNG
• A PNG file is an image file stored in the Portable Network Graphic
(PNG) format. It contains a bitmap of indexed colors and uses lossless
compression, similar to a .GIF file but without copyright limitations.
• PNG files are commonly used to store graphics for web images.
• The PNG format was created in response to limitations with the GIF
format, primarily to increase color support and to provide an image
format without a patent license.
• It was designed to replace gif format as gif supported 256 colors
unlike PNG which support 16 million colors.
3D drawing and rendering
• 3D rendering is the process of automatically converting 3D models into
2D images on a computer. 3D renders may includephotorealistic effects
or non-photorealistic effects.
• 3D rendering is a process that allows architects and designers to
showcase a 3D model of their building from a 2D illustration. This
technique uses computer programs to create an object in space, tweak
design elements, and add elements that include shading, lighting, and
texture.
Global illuminationor indirect illumination
•  It take into account not only the light that comes directly from a light
source (direct illumination), but also subsequent cases in which light
rays from the same source are reflected by other surfaces in the
scene, whether reflective or not (indirect illumination).
• reflections, refractions, and shadows are all examples of global
illumination, because when simulating them, one object affects the
rendering of another (as opposed to an object being affected only by
a direct light).
Reflection and shading models
• Models of reflection/scattering and shading are used to describe the
appearance of a surface.
• Surface shading - How light spreads across a surface
• Reflection/Scattering - How light interacts with a surface at a given
point 
• Shading-Shading refers to depicting depth perception in 3D models or
illustrations by varying levels of darkness.
• Shading refers to the process of altering the color of an
object/surface/polygon in the 3D scene, based on things like (but not
limited to) the surface's angle to lights, its distance from lights, its angle to
the camera and material properties (e.g. bidirectional reflectance
distribution function) to create a photorealistic effect.
• Flat shading-A technique that shades each polygon of an object based on
the polygon's "normal" and the position and intensity of a light source.
• Smooth shading-In contrast to flat shading where the colors change
discontinuously at polygon borders, with smooth shading the color
changes from pixel to pixel, resulting in a smooth color transition between
two adjacent polygons.
Types of smooth shading include:
• Gouraud shading
• Phong shading
Gouraud shading
• Determine the normal at each polygon vertex.
• Apply an illumination model to each vertex to calculate the light intensity from the vertex normal.
• Interpolate the vertex intensities using bilinear interpolation over the surface polygon
Phong shading
Phong shading is similar to Gouraud shading, except that instead of interpolating the light
intensities, the normals are interpolated between the vertices. Thus, the specular highlights are
computed much more precisely than in the Gouraud shading model:
• Compute a normal N for each vertex of the polygon.
• From bilinear interpolation compute a normal, Ni, for each pixel. (This must be renormalized each
time.)
• Apply an illumination model to each pixel to calculate the light intensity from Ni.
Transport
• Transport describes how illumination in a scene gets from one place
to another. Visibility is a major component of light transport.
Projection
• The shaded three-dimensional objects must be flattened so that the
display device - namely a monitor - can display it in only two
dimensions, this process is called 3D projection. This is done using
projection and, for most applications, perspective projection. The
basic idea behind perspective projection is that objects that are
further away are made smaller in relation to those that are closer to
the eye.
Rasterization- Rasterisation (or rasterization) is the task of taking an
image described in a vector graphics format (shapes) and converting it
into a raster image ( A series of pixels, dots or lines that when they
come together on a display, they recreate the image).
Rasterization is the process by which a primitive is converted to a two-
dimensional image. Each point of this image contains such information
as color and depth. Thus, rasterizing a primitive consists of two parts.
The first is to determine which squares of an integer grid in window
coordinates are occupied by the primitive. The second is assigning a
color and a depth value to each such square.
• Ray Tracing- Ray tracing is a technique for rendering three-dimensional graphics
with very complex light interactions. This means you can create pictures full of
mirrors, transparent surfaces, and shadows, with stunning results.
• The name ``ray tracing'' is a bit misleading because the natural assumption
would be that rays are traced starting at their point of origin, the light source,
and towards their destination, the eye, , but unfortunately it tends to be very
difficult due to the sheer numbers involved. 
• if we look at the problem backwards, we see that it has a very simple solution.
Instead of tracing the rays starting at the light source, we trace them
backwards, starting at the eye.
• For each pixel on the view window, we define a ray that extends from the eye to
that point. We follow this ray out into the scene and as it bounces off of
different objects. The final color of the ray (and therefore of the corresponding
pixel) is given by the colors of the objects hit by the ray as it travels through the
scene. 
• In the figure we see two rays, a and b, which intersect the purple
sphere. To determine the color of a, we follow the new ray a' directly
towards the light source. The color of a will then depend on several
factors, discussed in Color and Shading below. As you can see, b will
be shadowed because the ray b' towards the light source is blocked
by the sphere itself. Ray a would have also been shadowed if another
object blocked the ray a'.
• in flat shading, where every point on the object has the same color.
• Lambertian shading or cosine shading-the mathematical function easily
implements the above effect: it returns the value 1 when given an angle
of zero, and returns zero when given a ninety degree angle (when the
surface and light source are perpendicular). Thus, to find the brightness
of a point, we simply take the cosine of the angle between the two
vectors. The values from -1 to 0 indicate that the surface is facing
away from the light source, so it doesn't receive any light. The value of 0
means the surface is directly perpendicular to the light source (it is
at grazing incidence), and so again does not receive any light. Values
above 0 indicate that the surface does receive some light, with maximum
reception when the dot product is 1.
• Texture Mapping-there is another way to color objects, which assigns
entire images to them instead of single colors. Known as texture
mapping
Clipping
• The primary use of clipping in computer graphics is to remove objects, lines,
or line segments that are outside the viewing pane. For the points behind
the viewer − and it is necessary to remove these points before generating
the view.
• Point clipping-Clipping a point from a given window is very easy.
•  Point clipping tells us whether the given point (X, Y) is within the given
window or not; and decides whether we will use the minimum and
maximum coordinates of the window.
• The X-coordinate of the given point is inside the window, if X lies in between
Wx1 ≤ X ≤ Wx2. Same way, Y coordinate of the given point is inside the
window, if Y lies in between Wy1 ≤ Y ≤ Wy2.
Line Clipping-The concept of line clipping is same as point clipping. In line
clipping, we will cut the portion of line which is outside of window and keep
only the portion that is inside the window.
Cohen-Sutherland Line Clippings-
This algorithm uses the clipping window as shown in the following figure. The
minimum coordinate for the clipping region is (XWmin, Ywmin) and the
maximum coordinate for the clipping region is (XWmax, YWmax).
• We will use 4-bits to divide the entire region. These 4 bits represent
the Top, Bottom, Right, and Left of the region as shown in the
following figure. Here, the TOP and LEFT bit is set to 1 because it is
the TOP-LEFT corner.
• Polygon Clipping-A polygon can also be clipped by specifying the clipping
window. Sutherland Hodgeman polygon clipping algorithm is used for
polygon clipping. In this algorithm, all the vertices of the polygon are clipped
against each edge of the clipping window.
• First the polygon is clipped against the left edge of the polygon window to
get new vertices of the polygon. These new vertices are used to clip the
polygon against right edge, top edge, bottom edge, of the clipping window
as shown in the following figure.
Text Clipping
Various techniques are used to provide text clipping in a computer
graphics. It depends on the methods used to generate characters and
the requirements of a particular application. There are three methods
for text clipping which are listed below −
• All or none string clipping
• All or none character clipping
• Text clipping
All or none string clipping
All or none character clipping
Text clipping

Das könnte Ihnen auch gefallen