20
Graphics and Graphics and Images Images Graphics and images are both non-textual Graphics and images are both non-textual information, that can be displayed and information, that can be displayed and printed. printed. These images may appear on screen as well as These images may appear on screen as well as on printers but cannot be displayed with on printers but cannot be displayed with devices only capable of handling characters. devices only capable of handling characters. The topics discussed are computerized The topics discussed are computerized graphics and images, their respective graphics and images, their respective properties, and how they can be acquired, properties, and how they can be acquired, manipulated and output on computers. manipulated and output on computers.

Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Embed Size (px)

Citation preview

Page 1: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and ImagesGraphics and images are both non-textual Graphics and images are both non-textual information, that can be displayed and printed.information, that can be displayed and printed.

These images may appear on screen as well as on These images may appear on screen as well as on printers but cannot be displayed with devices only printers but cannot be displayed with devices only capable of handling characters.capable of handling characters.

The topics discussed are computerized graphics and The topics discussed are computerized graphics and images, their respective properties, and how they images, their respective properties, and how they can be acquired, manipulated and output on can be acquired, manipulated and output on computers.computers.

Page 2: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and ImagesIntroduction:Introduction:

Graphics are normally created in graphics Graphics are normally created in graphics application and internally represented as an application and internally represented as an assemblage of objects such as lines, curves and assemblage of objects such as lines, curves and circles. Attributes of such as style, width and color circles. Attributes of such as style, width and color define the appearance of the graphics. define the appearance of the graphics.

Difference between objects graphics and imagesDifference between objects graphics and imagesObject graphics are composed of can be Object graphics are composed of can be

individually deleted, added, moved or modified individually deleted, added, moved or modified later. In contrast, images can be from the real world later. In contrast, images can be from the real world or virtual and are not editable.or virtual and are not editable.

Page 3: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and ImagesWhat is Bitmap (BMP)?What is Bitmap (BMP)?The array of pixels (i.e. set of pixels) is called a bit The array of pixels (i.e. set of pixels) is called a bit map. In bitmap object based editing is not possible, map. In bitmap object based editing is not possible, but image editing tools exist for enhancing and but image editing tools exist for enhancing and retouching bitmap images.retouching bitmap images.

The drawback of bitmaps is that they need much The drawback of bitmaps is that they need much more storage capacity than graphics. Their more storage capacity than graphics. Their advantage is that no processing is necessary before advantage is that no processing is necessary before displaying them, unlike graphics where the abstract displaying them, unlike graphics where the abstract definition must be processed first to produce the definition must be processed first to produce the bitmap.bitmap.

Page 4: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and Images

Page 5: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and Images

Page 6: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and Images

Page 7: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and Images Graphics and Images (contd…)(contd…)

Page 8: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and Images

Page 9: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and Images

Page 10: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and Images

Page 11: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and Images

Page 12: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and Images

Page 13: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and ImagesPortable Bitmap Plus (PBMplus)Portable Bitmap Plus (PBMplus)

It is a software package that allows It is a software package that allows conversion of images between various image conversion of images between various image formats and their script based modification.formats and their script based modification.

PBMplus includes four different image formatsPBMplus includes four different image formats

PBM – Portable Bitmap for binary imagesPBM – Portable Bitmap for binary images

PGM- Portable Graymap for gray-value imagesPGM- Portable Graymap for gray-value images

PPM – Portable Pixmap for true color imagesPPM – Portable Pixmap for true color images

PNM – Portable Anymap for format-independent PNM – Portable Anymap for format-independent manipulation of images.manipulation of images.

Page 14: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and ImagesThe contents of PBMplus files are the following:-The contents of PBMplus files are the following:-

A magic number identifying the file type i.e “P1” for PBM.A magic number identifying the file type i.e “P1” for PBM.Blanks, tabs, carriage returns, and the line feeds.Blanks, tabs, carriage returns, and the line feeds.Decimal ASCII characters that define image width.Decimal ASCII characters that define image width.Decimal ASCII characters that define image height.Decimal ASCII characters that define image height.ASCII numbers plus blanks that specify the maximum value of ASCII numbers plus blanks that specify the maximum value of color informationcolor information

Filter tools are used to manipulate internal image formats. The Filter tools are used to manipulate internal image formats. The functions offered by these tools include color reduction, functions offered by these tools include color reduction, quantization and analysis of color values etc.quantization and analysis of color values etc.

Page 15: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and ImagesBitmap (BMP)Bitmap (BMP)

BMP files are device independent bitmap files BMP files are device independent bitmap files most frequently used in Windows systems. The BMP most frequently used in Windows systems. The BMP format is based on the RGB color model. BMP does not format is based on the RGB color model. BMP does not compress the original image. The BMP format defines compress the original image. The BMP format defines a header and a data region.a header and a data region.

The header region (BITMAPINFO) contains The header region (BITMAPINFO) contains information about size, color, depth, colortable and information about size, color, depth, colortable and compression method. The data region contains the compression method. The data region contains the value of each pixel in a line. Lines are flush-extended value of each pixel in a line. Lines are flush-extended to a value divisible by 32 and padded with zero values.to a value divisible by 32 and padded with zero values.

Page 16: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Graphics and ImagesGraphics and ImagesValid color depth value are 1,4,8 and 24. The BMP Valid color depth value are 1,4,8 and 24. The BMP format uses the run-length encoding algorithm to format uses the run-length encoding algorithm to compress images with a color depth of 4 or 8 compress images with a color depth of 4 or 8 bits/pixel, where two bytes each are handled as an bits/pixel, where two bytes each are handled as an information unit. If the first byte value contains zero information unit. If the first byte value contains zero and second value is greater than three, then the and second value is greater than three, then the second value contains number of bytes that follow and second value contains number of bytes that follow and contains the color of the next pixel as a reference to contains the color of the next pixel as a reference to the color table (no compression)the color table (no compression)

BMP specifies an additional option to specify a color BMP specifies an additional option to specify a color table to be used to select colors when the image is table to be used to select colors when the image is displayed.displayed.

Page 17: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Creating GraphicsCreating GraphicsInput DevicesInput Devices

Modern graphical Input devices include mice, tablets, and Modern graphical Input devices include mice, tablets, and transparent, highly sensitive screens, or input devices that allow three-transparent, highly sensitive screens, or input devices that allow three-dimensional or higher-dimensional input values.dimensional or higher-dimensional input values.

Trackball models are available today that rotate around the Trackball models are available today that rotate around the vertical axis in addition to the two horizontal axes. A space ball is a solid vertical axis in addition to the two horizontal axes. A space ball is a solid ball positioned on the elastic base. Pressing or pulling the ball in any ball positioned on the elastic base. Pressing or pulling the ball in any direction produces a 3D translation and a 3D orientation.direction produces a 3D translation and a 3D orientation.

A data glove is a device that senses the hand position and its A data glove is a device that senses the hand position and its orientation. It allows positioning objects, exploring and navigating with orientation. It allows positioning objects, exploring and navigating with the scenes, or acting at a distance on the real world. Virtual objects may the scenes, or acting at a distance on the real world. Virtual objects may be manipulated, for example rotated for further examination.be manipulated, for example rotated for further examination.

Page 18: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Creating GraphicsCreating GraphicsGraphics softwareGraphics software

Graphics are generated by use of interactive Graphics are generated by use of interactive graphic systems. The conceptual environment of graphic systems. The conceptual environment of almost all interactive graphic systems is an almost all interactive graphic systems is an aggregated view consisting of three software aggregated view consisting of three software components – application model, application program components – application model, application program and graphics system (one hardware component)and graphics system (one hardware component)

Page 19: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Creating GraphicsCreating GraphicsStoring graphicsStoring graphics

Graphic primitives and their attributes are on a higher Graphic primitives and their attributes are on a higher image representation level because they are generally not image representation level because they are generally not specified in pixel matrix. The higher level has to be mapped to a specified in pixel matrix. The higher level has to be mapped to a lower level at one point during image processing, for example lower level at one point during image processing, for example when representing an image, having the primitives on a higher when representing an image, having the primitives on a higher level is an advantage because it reduces the data volume that level is an advantage because it reduces the data volume that has to be stored for each image allows simpler manipulation. has to be stored for each image allows simpler manipulation. Some graphic packages for example, SRGP (Simple Raster Some graphic packages for example, SRGP (Simple Raster Graphics Package), includes conversion which requires additional Graphics Package), includes conversion which requires additional step for this conversion which is a drawback, Many color systems step for this conversion which is a drawback, Many color systems uses 8 bits per pixel (eg GIF) so that 256 colors can be uses 8 bits per pixel (eg GIF) so that 256 colors can be represented simultaneously, other formats (including JPEG) allow represented simultaneously, other formats (including JPEG) allow 24 bits per pixel, representing approximately 16 million colors.24 bits per pixel, representing approximately 16 million colors.

Other packages include PHIGS(Programmer’s Hierarchical Other packages include PHIGS(Programmer’s Hierarchical Interactive Graphics System) and GKS (Graphics Kernel System) Interactive Graphics System) and GKS (Graphics Kernel System) use graphics specified by pixmap.use graphics specified by pixmap.

Page 20: Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well

Creating GraphicsCreating GraphicsGraphics storage formatsGraphics storage formats

File format for vector graphics allow loading and storing of File format for vector graphics allow loading and storing of graphics in vectored representation, such as files created in a graphics in vectored representation, such as files created in a vector graphics application.vector graphics application.

IGES: The initial graphics Exchange Standard was developed by an IGES: The initial graphics Exchange Standard was developed by an industry committee to formulate a standard for the transfer of 2D and 3D CAD industry committee to formulate a standard for the transfer of 2D and 3D CAD data.data.

DXF: Autodesk’s 2D and 3D format was initially developed for AutoCAD a DXF: Autodesk’s 2D and 3D format was initially developed for AutoCAD a computer aided design application.computer aided design application.

HPGL: The Hewlett Packard Graphics Language has been designed to HPGL: The Hewlett Packard Graphics Language has been designed to address plotters, which is the reason why it only supports 2D representation.address plotters, which is the reason why it only supports 2D representation.

The combination of vector and raster graphics is generally possible in modern The combination of vector and raster graphics is generally possible in modern vector graphics systems. Only few so called meta files such as CGM- Computer vector graphics systems. Only few so called meta files such as CGM- Computer Graphics Meta file, WMF (Windows Meta File) and others allow an arbitrary mixture Graphics Meta file, WMF (Windows Meta File) and others allow an arbitrary mixture of vector and raster graphicsof vector and raster graphics