See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/366578092 Application and difference of raster and vector graphics Conference Paper · October 2019 CITATIONS 0 READS 52 2 authors: Sinisa Mihajlovic University of Novi Sad 24 PUBLICATIONS   14 CITATIONS    SEE PROFILE Ivana Berković University of Novi Sad 14 PUBLICATIONS   12 CITATIONS    SEE PROFILE All content following this page was uploaded by Sinisa Mihajlovic on 25 December 2022. The user has requested enhancement of the downloaded file. Application and difference of raster and vector graphics S. Mihajlović, I. Berković University of Novi Sad, Technical Faculty “Mihajlo Pupin”, Zrenjanin, Republic of Serbia mihajlovicsinisa25@gmail.com, ivana.berkovic62@gmail.com Abstract - This paper presents what raster and vector graphics are, as well as their role. The image formats are shown, as well as their division into vector or raster types. The application of raster and vector graphics in programs is described. In addition, raster and vector graphics are compared, and their advantages and disadvantages are presented. I. INTRODUCTION Computer graphics are pictures and films created using computers. Computer graphics is a sub-field of Computer Science which studies methods for digitally synthesizing and manipulating visual content. Computer graphics is rapidly evolving and expanding since the advent of personal computers. The highly developed ability to recognize shape in humans makes computer graphics one of the most natural ways to communicate with your computer. Raster graphical interaction has become a standard component of computer use interfaces. Computer graphics include the creation, storage and use of models and images of objects. Computer graphics models and objects come from different fields: nature, science, engineering, abstract concepts, etc. [1] Raster graphics are based on a two-dimensional grid of pixels. An image is displayed as a discrete set of tiny elements of an image (Pixel – PICture ELement), and each pixel is assigned a number, representing the color of the pixels. Vector graphics use basic geometric figures (points, directions, circles, arcs, polygons) to display an image. This allows the image to be enlarged without losing image quality, for unlike raster graphics [2]. In a computer sense, an image is the product of a graphic program that is executed with the help of a computer. An image is loaded into the computer's memory space in one of three ways: • By uploading an image from a digital camera's memory, directly from the camera or from another memory space (Internet ...). • Scanning with a peripheral called a scanner. • By creating an image using a program to create or process images [3]. II. RELATED WORK Computer graphics is nowadays used in various fields of economy, administration, education, entertainment and everyday home life. The field of application is expanding rapidly with the spread of computers. In vector graphics, building elements are objects (straight and curved lines, open and closed, filled and unfilled geometric shapes) that can overlap, overlap, or fit to form an image. Computer internal representation of such images is a series of mathematical vector formulas that describe the manner and order of drawing objects, hence the name of the type of graphics itself. Vector graphics find their application in CAD programs for designers and there is no alternative if we want to simulate a three-dimensional world with a computer. Vector graphics are completely inappropriate for displaying scenes consisting of so many details that do not fit into a mathematically descriptive link (photography). In these cases, raster graphics are used. Raster graphics use the so-called basic element of the image. pixel, which has unique values of color and or intensity. A raster image is an image composed of points of different brightness levels or different colors [7]. Raster graphics or bitmaps are data that represent a rectangular grid of pixels or colored dots, on a graphical output device such as a monitor or on paper. Each color of an individual pixel is separately defined such that (for example) RGB images contain three bytes per pixel, each byte contains one specially defined color. Red Green Blue - this means that each color has its own value, changing the value yields colors other than these three basic ones. The higher these values the image will take up more space. If the image is black and white, this means that the pixel requires only one bit as opposed to a color image that requires three bytes (RGB) per pixel. Therefore, black and white images are smaller in terms of space. A raster RGB image, each pixel has its own R, G and B value, which is measured in percent [1]. Vector images can scale without damage and are relatively small. It only takes a few hundred kilobytes. Printing a vector illustration in small size gives it a great and beautiful quality, and if enlarged to a large size it still looks perfect. Raster images depend on the resolution. The image is damaged by increasing the image size. The pixel is a small part of the raster image. Computer pixels are square in shape and rectangular on TV. The pixel on the computer image contains the tonal information of the same location in the original image. Pixels can represent monochrome information, duotone information, RGB color information, CMYK (cyan, magenta, yellow, black) colors and other colors. The computer displays the pixel so that the computer considers the correct color for that small part of the original image. Bitmap represents the original image, but in the digital world [12]. The quality of a single raster image determines the total number of pixels (resolution) as well as the number of values for each individual pixel (color depth). If the color depth is greater, more shades can be displayed, which means a better image as well as a more authentic display. Images require a lot of memory, which is why various types of compression are used. Bitmap (BMP) is an uncompressed file that does not use any type of compression, the images in this format are very large, unlike the BMP format much more popular and more commonly used is the JPEG (JPG) format which compresses the image without noticing a loss in quality though it’s impossible to do, but it’s close to reality. A raster image cannot be enlarged to a higher resolution without loss of quality, which is not the case with vector graphics. Raster graphics are more practical than vector graphics for photographers and ordinary users. Vector graphics are used by graphic designers and DTP editors. The first versions of the monitor could display from about 72 to 130 pixels per inch (PPI), while today's printers can print 2400 dots per inch (DPI). Vector graphics or geometric shaping is a way of displaying an image using geometric shapes such as points, lines, curves, and polygons that are based on mathematical equations. In general, vector shapes are much easier to remember than demanding bitmap images. Almost all of today's computer graphics represent a vector image in raster format. The raster image is stored in memory and contains data for each pixel of an image. The term vector graphics has been mostly used in the context of two-dimensional computer graphics. Almost every 3D rendering was done using a 2D vector technique (using dots, lines and polygons). Vector graphics are good for removing unnecessary details from a photo [1]. The raster image is represented approximately by dividing the surface of the image by lines parallel to horizontal and vertical axis in the grid of squares - pixels. The pixel is characterized by the intensity of lighting and colors. How many images will take up space it does not depend on the computer memory just from its complexity but rather than the number of pixels and number the colors available. Vector graphics or geometric shaping is a way of displaying an image using geometric shapes such as points, lines, curves, and polygons that are based on mathematical equations. Unlike bitmap images, the vector format is reusable because it allows printing on any format, with extreme ease and flexibility, making it unrivaled in creating and storing logos. As much as it works on advancement of the programs, it is not possible to achieve photorealistic, which is also the only, great disadvantage of vector views. The most famous vector formats are EPS, AI, PDF, etc. [3] Scalable Vector Graphics (SVG) is a standard for vector graphics developed by World Wide Web Consortium (W3C). The standard is very complex, many browsers and programs now offer support for rendering SVG data, although complete implementation is still very rare. Metafile is a generic name for a format that contains multiple types of data. Typically, raster and vector formats are combined. The most popular is Adobe PDF [6]. Table 1 illustrate most important images formats. TABLE I. MOST IMPORTANT IMAGES FORMATS [3] Format Vector or Raster Description .BMP Windows Bitmap Raster Used to view and store Windows images. .CGM Computer Graphics Metafile Vector A format developed by the collaboration of various standardization organizations. It is supported by many software companies. .DCX Windows Images Raster Format for multiple '.PCX' files (Windows). .DXF Data Exchange File Vector Format created by AutoDesk. Almost all PC based CAD (Computer Aided Design) based systems support DXF. .EPS Encapsulated Postscript Vector, often with a Raster header Format for PostScript language. EPS uses a combination of PostScript commands and TIFF or PICT format. .GIF Graphics Interchange Format Raster This format can be used on different platforms, and is often used to store images for the WWW. Because the record is relatively small, images are quickly transmitted over the Internet. However, the GIF is limited to 256 colors, and colors are not displayed on all platforms. .JPG Joint Photographic Experts Group Raster An international standard used for digital image compression. The files are relatively small, depending on the degree compression. This is an original image format that cannot be restored. .PCX PC Paintbrush Raster Format created by Zsoft. Supported by many Windows applications, as well as many optical scanners and fax modems. .PIC Lotus Picture File Vector A relatively simple graphic format developed by Lotus to display the graphics generated by Lotus 1-2-3. PIC is supported by many PC applications. .PICT Picture Format Vector A format for Macintosh graphics files developed by Apple Computer. It is supported by all graphics programs that working on a Macintosh. .PNG Portable Network Graphics Raster A more advanced version of the .GIF format. .TIFF Tagged Image File Format Raster This format is used to save and exchange between 'desktop publishing' and 'graphic design' applications. TIFF also support different platforms, such as Microsoft Windows and Macintosh. It is also used for scanning image because it supports all sizes, resolutions and color depths. .WMF Windows Metafile Vector, may also contain a raster image Windows image storage and sharing format applications. .WPG WordPerfect Graphic File Vector Format used by WordPerfect. III. APPLICATION OF RASTER AND VECTOR GRAPHICS Raster images can be inserted into vector programs, but their ability is modification and transformation in these programs is limited. For a generation of modification (retouching) of raster images raster programs are used. As the capabilities of these programs are based on the theory of photography combined with modern technology, to describe the capabilities of these programs than for vector programs. Corel Photo-Paint is part of the Corel software package intended for creating, retouching and processing raster images [3]. Although basic operations over raster graphics (resizing) color depths, cropping part of the image, image rotation) can be done using tools that are component of system software (MS Paint), for any serious interventions (contrast adjustment, histograms, imitation painting techniques) are used professional software, the most famous of which is Adobe Photoshop [2]. Figure 1 shows an example of using Adobe Photoshop software, while Figure 2 shows the use of Adobe Illustrator software. Figure 1. Example of using Adobe Photoshop raster graphics software [10] Vector graphics software is used for DTP (DeskTop Publishing), graphic design and CAD (Computer Aided Design), or computer-aided design. The first one the commercial application of CAD was in large companies in the automotive and aviation industries, and in electronics. Back then, only large corporations could afford computers that could run complex calculations [2]. Catia is used for 3D modeling. Autodesk has created CAD software and its main purpose is 2D and 3D modeling, but it is also used for CAM (Computer Aided Manufacturing), computer-aided manufacturing and CAE (Computer Aided Engineering), computer-aided technology. CAE covers the use of computers in design, computer analysis and simulation [2]. In the most widespread programs, which are fully compatible and capable are to save the vector format, include Adobe Illustrator, Corel Draw, Macromedia Freehand and others. Bitmap image processing programs are numerous and most common Adobe Photoshop, Adobe Lightroom, Corel Photo-Paint, ultimately the case of Paint [5]. Gimp (GNU Image Manipulation Program) is an extremely high-quality graphic element processing program that can be used in many ways: as a simple drawing program, as a professional image processing program, as an image renderer, as a graphic format converter. GIMP's main function is to edit bitmaps, but with it comes tools for working with vector graphics. It is primarily intended for the Linux platform (where it was popularly called "Photoshop for Linux"), and there are versions of it for the Mac and Windows platforms. Its user interface is a bit cumbersome and confusing, which may be its biggest drawback [8]. Figure 2. Example of using Adobe Illustrator software for vector graphics [11] IV. COMPARISON Comparing raster and vector graphics, the following differences are observed: the first important difference is that the image quality decreases with increasing bitmap, while the vector image does not lose image quality, because every time the computer changes the value of all pixels is recalculated. For vector images, magnification is done by resizing the vector using arithmetic formulas, so that enlarging the image has no effect on the display quality. Another important difference is the size of the graphic file. Raster graphics images have a much larger file, while vector graphics allow for a much smaller file size [4]. Figure 3 illustrate an example of vector and raster graphics. Figure 3. Example image shown in vector and raster graphics [9] Vector graphics have many advantages over raster graphics: • They need significantly less memory space, • They are easy to manipulate, without losing shape and quality. • When the vector image is enlarged, it does not lose a bit on the sharpness and quality of the image. • If the raster image is reduced and then resized, some image details are permanently lost [7]. However, raster images are very suitable for adding fine effects to an existing image. Raster images are especially useful for displaying images with many details [7]. Vector graphics are used to create logos, illustrations and precise typography. Vector images come from graphics programs. An image cannot be scanned or saved as a vector file without special software. The vector can be easily converted to a raster. Most vector programs offer rasterization options. Opening a vector file in an Adobe Photoshop raster program will be automatically rasterized [13]. V. CONCLUSION Computer graphics is constantly advancing, and as technology evolves, its use is expanding. There is a division into raster and vector graphics, and each has its own role. Raster graphics consist of pixels, while vector graphics consist of mathematical formulas. The raster data takes up a lot of space, and if the raster image is enlarged, it loses quality. Vector images take up little space, it is possible to enlarge and reduce the image without losing quality. Therefore, it is ideally suited for corporate logos, geographical maps and other objects that often need to be resized. Raster and vector graphics are used in various programs. The most popular program used to work with raster images is Adobe Photoshop, while to use vector images is used Adobe Illustrator, Corel Draw and others. Computer graphics is used in virtual reality, which brings innovations in architecture, sports, medicine, the arts and entertainment. Virtual reality is at the beginning of development, but in the future, it will be a daily occurrence, and anyone will be able to use it. Developing computer graphics enhances the quality of photos, movies, games, and software on a daily basis. ACKNOWLEDGMENT Ministry of Education, Science and Technological Development, Republic of Serbia financially supported this research, under the project number TR32044: “The development of software tools for business process analysis and improvement”, 2011-2019. REFERENCES [1] V. Gavranić, Computer Graphics - Introduction: Content of computer graphics (Original in Serbian: Računarska grafika – Uvod: Sadržaj računarske grafike), November 2011. [2] S. Lemeš, Computer Graphics (Original in Serbian: Računarska grafika), 2010. [3] Image processing (Original in Serbian: Obrada slika). URL: https://bit.ly/2oxPjL2 (accessed 28.09.2019.) [4] A. Đurišić, PixelByPixel software for visualizing raster algorithms for computer graphics (Original in Serbian: Programski paket PixelByPixel za vizualizaciju rasterskih algoritama računarske grafike), Univerzitet u Nišu, Prirodno-matematički fakultet, 2018. [5] Bitmaped graphic formats supported on the web (Original in Serbian: Bitmapirani grafički formati podržani na webu). URL: http://www2.viser.edu.rs/download.php?id=15895 (accessed 28.09.2019.) [6] I. Pavlović, Application of vector and raster graphics in photorealistic 3D rendering (Original in Serbian: Primena vektorske i rasterske grafike u fotorealističnom 3D renderovanju), Univerzitet Singidunum, Beograd, 2013. [7] Application of computers in graphics (Original in Serbian: Primena računara u grafici). URL: https://bit.ly/2nU8gYn (accessed 29.09.2019.) [8] Link University. URL: https://bit.ly/2nTIUtG (accessed 29.09.2019.) [9] GraphicMama’s Blog. URL: https://bit.ly/2ptCv95 (accessed 30.09.2019.) [10] SLR Lounge. URL: https://bit.ly/2ppVd1b (accessed 30.09.2019.) [11] EngView Systems. URL: https://bit.ly/2nKZVX5 (accessed 01.10.2019.) [12] B. P. Lawler, Vector that, Charlie!, 2002. [13] Bokland Custom Visuals, Raster vs. Vector 24 May 2018. View publication stats