Raster and vector images. What is raster graphics and where is its use? Raster image presentation

Often, as well as touching the issue of web or printing design, we meet the concept of raster and vector graphics. In this post, I will try as much as possible and intelligibly explain what it is where it is applied and why it is necessary.

Raster graphics

With examples of raster graphics, we are constantly confronted in life: the picture on TV, the laptop monitor, tablet or smartphone displays are all examples of raster graphics. But what is raster graphics from the technical side? Imagine a chessboard, each cell is minimal, non-divisible unit. In the raster graphics, it is customary called such a minimal unit "pixel". Any raster image consists of a plurality of such pixels that create a kind of mosaic. Because The pixels are very small and there are many of them, our eye perceives this mosaic as a solid image.

By expanding files, you can often immediately understand that they contain a raster image.

Formats raster graphics

BMP, GIF, JPG and JPEG, PNG, PICT, PCX, TIFF, PSD (with some exceptions see below)

Editors raster graphics

There are a lot of them, but the basic is Photoshop and Paint Brush (default program installed on Windows), as well as specialized raster graphics editors for digital drawing (for example, Corel Painter).

Disadvantages and limitations of raster graphics

The most important drawback of raster graphics is a loss of quality with an increase in the image. What happens when you stretch the raster image: between existing pixels, the graphic editor of raster graphics creates additional, and the color applies medium with conjugate pixels. As a result, we get "blurred", not a clear image. In addition, raster graphics files have a larger size compared to vector graphics files.
If we talk about photographs or images in which you need to transmit photographic quality with halftones - there is no alternative to a solution of format.

Vector graphics

If you are not a designer, then with examples of vector graphics you encounter much less often. Most often, vector graphics are used to create layouts, most common in printing design. Vector graphics can not transfer tones and halftone, but much more convenient if we are talking about simple forms, texts, contour figures. The principle of vector graphics: any contour is set using reference points, and the entire space of the workspace is the coordinate system. Any figure in such space is described by the coordinates of the reference points connecting the sections between them and the characteristics of the fill (color, gradient, pattern) of the surface inside. Those. Any vector image is primarily mathematical formula.

Vector graphic formats

CDR, EPS, AI, CMX, SVG, PSD (in some cases)

Editors vector graphic

The most common editors of vector graphics are CorelDRAW and Illustrator. But there is another important exception that has appeared just a few years ago. In Photoshop (original raster editor), there is now the ability to use the vector. Therefore, Photoshop can be simultaneously attributed to the raster graphics editors and to the vector graphics editor. I recommend this to read a separate post, where I describe in detail about the vector instruments.

Disadvantages and limitations of vector graphics

I repeat that vector graphics are quite specialized. Speech can not go that it can replace raster format. Vector graphics are not capable of transmitting tones and halftones as a photographic image and serves for other purposes.

Advantages of vector format

Any image in a vector format can be easily scaled both into a smaller way and in a large side without loss of quality. What happens when the vector image is scaling: because A vector image is a mathematical expression, with an increase in or decrease, the program recalculates the coordinates of the reference points and "redraws" the image along the new one. Therefore, it is the vector format that is usually used by designers when developing a logo. Vector logo Customer will always be able to change in a change without loss in quality (even increase to the state of the banner and wrap its office 10 times). Not an unimportant advantage of the vector format is also the ability to quickly correct the color in just a couple of clicks (since the color is also set by a digital value) and a very small size of the files (the mathematical formula describes only the support points, and not every pixel of the working space).

New perspectives open to vector images with the advent of the SVG format that begins to be widely used in web design. Modern browsers are already supporting this graphic format that allows you to scale the images into SVG without loss of quality, which is relevant for example, with the adaptability of the site.

Sampling

An example of analog representation graphic information a picturesque cloth can serve, the color of which changes continuously, and the discrete is an image printed with an inkjet printer and consisting of separate points of different colors.

An example of analog storage sound information it is a vinyl record (the sound track changes its form continuously), and the discrete - audio component (which contains sections with different reflectivity).

Representation of images in computer

Picture:

    Raster

    Vector

Raster:

Raster imageit is a combination of points (pixels) of different colors.

Pixel - The minimum portion of the image whose color can be set independently.

In the process of encoding the image, its spatial discretization is made.

The spatial discretization of the image can be compared with the construction of an image from a mosaic (large number of small multi-colored glasses).

The image is divided into separate small fragments (points), and each fragment is assigned to its color, that is, color code (red, green, blue, etc.).

The image quality depends on the number of points (the smaller the size of the point and, respectively, the more than their number, the better the quality) and the number of colors used (the more colors, the better the image is encoded).

Pluses of raster coding:

2. Prevalence

Cons of raster coding:

1. Universal method (allows you to encode any image)

2. Prevalence

3. The only method for encoding and processing blurred images that do not have clear boundaries (photographs)

4. The raster image is natural for most I / O devices

The most popular raster formats:

Formats of raster images:

    Bit Map Image (BMP)- Universal format of raster graphic files, used in the Windows operating system. This format is supported by many graphic editors, including the Paint editor. Recommended for storing and exchanging data with other applications.

    Graphics Interchange Format (GIF)- Format of raster graphic files, supported by applications for various operating systems. Includes compression algorithm without information loss, allowing you to reduce the file size several times. It is recommended for storing images created by programmatically (charts, graphs, and so on) and drawings (type of application) with a limited amount of colors (up to 256). Used to accommodate graphic images on web pages on the Internet.

    Tagged Image File Format (TIFF)- Format of raster graphic files, supported by all major graphic editors and computer platforms. Includes a compression algorithm without information loss. Used to exchange documents between different programs. Recommended for use when working with publishing systems. The format supports a large range of color depth change, different color spaces, different compression settings (both loss and without loss).

    Raw.- Stores information directly obtained from the matrix of a digital camera or a similar device without applying any transformations to it, and also stores the camera settings.

Vector Image:

Vector Imageit is a combination of graphic primitives (point, segment, ellipse ...). Each primitive is described by mathematical formulas. Coding depends on the applied environment.

Dignityvector graphics is that files that store vector graphic images have a relatively small volume.

It is also important that vector graphic images can be increased or reduced without loss of quality.

Pluses of vector images:

1. The best way to store drawings, schemes, cards

2. When encoding there is no loss of information

3. When resizing there are no distortions

4. File size depends on drawing complexity

5. When scaling the image there is no distortion

Cons Vector Images:

1. Not all objects can be depicted in vector form

2. Difficult translation from raster in vector image

3. It is ineffective to use for photos and blurry images

Vector image formats

    cDR.- The format used by the CorelDRAW program.

    cMX.- Corel graphic software format, designed to transfer drawings between different programs.

    aI- Format files created by Adobe Illustrator.

    wMF.(Windows MetaFile) - a graphical format of the file in the Microsoft Windows system, a universal vector format supported by mostWindows.

    ePS.- relatively universal vector file format supported by most vector editors - CorelDRAW, Adobe Illustrator, Macromedia Freehand.

    fla- Sourceflash files are created inadobeflash (formerly.macromediaflash).

    sWF.- Flash format that can be viewed using Flash Player, installed as Plugin in the browser.

    sVG. - Reduction from the English. Scalable Vector Graphics. It is an open standard, i.e. Unlike most other formats, SVG is not any property.

"

Raster graphics - These are images made up of pixels - small colored squares placed in a rectangular grid. Pixel is the smallest unit of digital image. The quality of the raster image directly depends on the number of pixels, of which it consists - the more pixels, the more parts can be displayed. Increase the bitmap image by stupid zoom in scale fails - the number of pixels cannot be increased, in this, I think many have convinced when they tried to see small details on a small digital photography, approaching it on the screen; As a result of this action, see something other than increasing quadraticles (this is exactly the pixels) failed. Such a focus is manifested only by the CIA agents in Hollywood movies, when they are using an external surveillance camera with an external surveillance camera. If you are not an employee of this structure and do not own such a magical instrument - you will not get anything.

The raster image has several characteristics. For photo station, the most important are: resolution, size and color model. Sometimes the size is also called the resolution and therefore the confusion occurs so that this does not happen, it is necessary to clearly represent what we are talking about and "watch by context" - the size is measured in MP (megapixes), and the resolution is DPI or PPI.

Resolution - This is the number of pixel per inch (PPI PIXEL PER INCH) to describe the display on the screen or number of dot points (DPI - Dot Per Inch) for printing images. There are several established rules: to publish an image on the Internet use 72PPI resolution, and for printing - 300dpi (PPI). The requirements of microstocks to images - 300dpi, as many works are bought precisely for printing.

The size - The total number of pixels in the image is usually measured in MP (megapixels), it is only a result of multiplying the number of pixels in height on the number of pixels in the width of the image. That is, if the magnitude of the photograph of 2000x1500, then its size will be 2000 * 1500 \u003d 3,000,000 pixels or 3MPs. To send on photobanks, the image size should not be less than 4MP, and in the case of illustration - no more than 280.

Color model - Characteristics of the image describing its presentation based on color channels. I know 4 color models - RGB (red, green and blue channels), CMYK (blue, purple, yellow and black), Lab ("Svetlota", red-green and blue-yellow) and GRAYScale (shades of gray). All microstoca take raster graphics in the RGB color model.

The advantages of raster graphics:

  1. The ability to play images of any level of complexity. The number of parts reproducible in the image depends largely on the number of pixels.
  2. Accurate transmission of color transitions.
  3. Availability of multitude of programs to display and edit raster graphics. The absolute majority of programs support the same raster graphics file formats. Raster representation, perhaps the most "old" way of storing digital images.

Disadvantages of raster graphics

  1. Large file size. In fact, for each pixel, you have to store information about its coordinates and color.
  2. The impossibility of scaling (in particular, increase) images without loss of quality.

Formats raster graphics

Despite the seeming simplicity of representation of raster graphics, its formats exists "car and a small cart"! And their number continues to change - some formats are obsolete, some just begin to be developed. Describe everything - for a long time and not interesting, I will describe only those that, in my opinion, can be interesting to designers and photo stamps.

PNG.(Portable Network Graphics) is another format of raster graphics that supports transparency, not only the usual transparency as GIF, but also translucency - a smooth transition of color into a transparent area. The goal of creating PNG was just a GIF replacement, since Company COMPUURVE - a GIF format developer in 1995 for 10 years patented the compression algorithm used when creating GIF images, which made it impossible to free use of this format in commercial projects.

Advantages of PNG:

  1. The ability to create a full-color image with color transitions and halftons.
  2. Saving graphic information using an algorithm for compression without loss.
  3. The possibility of using alpha channels, that is, simply speaking, transparency and, more - translucent, which allows you to create smooth color transitions to a transparent area.

Disadvantage of PNG, in my opinion, only 2:

  1. The inability to create an animated image
  2. An ambiguous "understanding" of transparency of PNG format Internet browsers. Some browsers, mostly outdated versions, refuse to display transparent areas of the PNG format and paint them with gray. But this deficiency, I think, will soon cease to be relevant.

TIFF.(Tagged Image File Format) - a format for storing high-quality images, supports any of the existing color models, provides a wide range of change in color depth, supports working with layers. Storage of information in TIFF format is possible both with losses and without loss. Cameras not supporting RAW format can sometimes take pictures in TIFF format.

On the photo banks, which have the ability to download additional formats to the main image in JPEG format (Dreamstime.com, iStock.com) as an additional can be downloaded to TIFF.

The disadvantage of the format is a big weight of the file, much greater than the file RAW format of the same quality - each snapshot in TIFF weighs from 8 to 20mB.

Raw.(Translated from English "Raw" - Raw)

RAW format appeared thanks to digital cameras. Raw is in essence of the "imprint", which remains on the camera's matrix at the time of shooting, or rather 3 imprints - in red, green and blue colors. In addition to these prints in the RAW file, some other data are stored in the RAW file, which in a similar case are rather a reference character, dictating the RAW converter with which intervivity to reflect each of the color channels for different pixels - is a white ballage, color space, etc. . The change in these parameters will not affect the source information, you can make them painlessly change and at any time return to the original form. With the resulting export, another raster format will work much more problematic. Extensions in RAW files can be different (.cr2, .crw, .nef, etc.) depending on the camera's brand - each camera manufacturer has its own way of storing information. To edit RAW files and convert them to other raster formats, camera manufacturers deliver their own software and the Canon RAW Converter will read only RAW files shot by Canon cameras (.cr2, .crw) and will not be able to read the RAW file shot Camera Nikon (.nef). There are RAW-converters of third-party manufacturers who work with most RAW files. In general, the absence of a single standard creates certain inconvenience when working with this format.

The disadvantages of the format are the large size of the file (although not so big as TIFF) and the absence of a single standard of formation of RAW files for all manufacturer of photographic equipment.

Raw Like TIFF can be sent to the photo banks as an "additional" image format - the availability of the source code can affect the designer's solution to purchase an image.

JPEG (Joint photographic Experts Group - developer name) - the most common format of raster graphics (at least on the Internet). JPEG - an example of using compression algorithms "with losses" or, differently, "distorting compression", it is most suitable for storing pictures, photos and other realistic images with smooth color transitions, but is practically not suitable for drawings and schemes, that is, For images with sharp transitions, the compression algorithm will form noticeable artifacts in the places of sharp contrast.

It is not recommended to store in this format intermediate work options - each "ENERGY" will lead to an irreversible loss of part of the information. The compression algorithm used in this format (Lossy Compress) is based on the "averaging" of the color nearby pixels.

JPEG does not support work with alpha channels, that is, it cannot contain transparent pixels, but allows you to save the clipping path in the file, which in the case of working with photo banks it is necessary to note in the description, the presence of a clipping path (if you, of course, have done and know What it is) is important information for the customer of the image.

JPEG format is also the main format in which photobanks take raster images (photos and illustrations) for sale. Save the end version of the file sent to the microstok, you need in the RGB color model, 300dpi resolution and, of course, 100% of the quality. You can also enter the IPTC information file (name, description, keywords) - JPEG format allows you to do this and this will significantly save you time when sending images into several photobanks.

In addition to the general formats of raster graphics (GIF, JPEG, TIFF, etc.), which are "read" by all the graphic editors and visitor images, there are "native" formats of almost every editor, which can be opened only by the program in which they were made, for example, Format.PSD Adobe Photoshop Programs. When processing photos, raster illustrations and design design, intermediate options should be saved in such formats and only the final versions of translating JPEG. This is necessary in order to keep the results of work without losing information and at any time make changes to the image or project.

Raster graphics

Raster graphics, general information. Raster representations of images. Types of raster. Factors affecting the number of memory occupied by a raster image. Advantages and disadvantages of raster graphics. The geometric characteristics of the raster (resolving the ability, the size of the raster, the form of pixels). The number of colors of the bitmap image. Means for working with raster graphics.

Raster graphics, general information

A computer raster image is represented as a rectangular matrix, each cell of which is represented by a color point.

The basis raster Graphic presentations is pixel (point) indicating its color. When describing, for example, a red ellipse on a white background, you must specify the color each Ellipses and background points. The image is presented in the form of a large number of points - than them are more, the visually high quality image and more file size. Those. One and even the picture can be represented with the best or worse quality in accordance with the number of points per unit length - resolution (Usually, dpi dpi dpi or pixels per inch - PPI).

Raster images resemble a sheet of cellular paper, on which any cell is painted either in black or white, forming a drawing together. Pixel - the main element of raster images. It is from such elements a raster image, i.e. Raster graphics describes images using color points ( pixels)located on the grid.

When editing raster graphics, you edit pixels, but not lines. Raster graphics depends on the permission, since the information describing the image is attached to the grid of a certain size. When editing raster graphics, the quality of its presentation may change. In particular, the change in the size of the raster graphics can lead to "grinding" edges of the image, since the pixels will be redistributed on the grid. The output of raster graphics on devices with a lower resolution than the resolution of the image itself will reduce its quality.

In addition, the quality is also characterized by the number of colors and shades that each image point can take. The more shades are characterized by image, the greater the number of discharges is required for their description. Red can be color number 001, and maybe - 00000001. Thus, the better the image, the greater the file size.

A raster representation is usually used for photographic images with a large number of parts or shades. Unfortunately, the scaling of such pictures in any direction usually worsens the quality. With a decrease in the number of points, small parts are lost and the inscriptions are deformed (though it may not be as noticeable when the visual sizes of the picture itself are reduced - i.e. saving permission). Adding pixels leads to a deterioration of sharpness and brightness of the image, because New points have to give shades, medium between two and more bordering colors.

Using raster graphics, you can reflect and transfer the entire range of shades and subtle effects inherent in the real image. Raster image closer to the photo, it allows you to more accurately reproduce the main characteristics of the photo: illumination, transparency and depth of field.

Most often, raster images are obtained by scanning photos and other images using a digital camera or by "capturing" frame video filming. Raster images can be obtained directly in raster or vector graphics programs by converting vector images.

Common formats .tif, .gif, .jpg, .png, .bmp, .pcx and etc.

Raster representations of images

Pixel - the main element of raster images. It is from such elements a raster image.

Digital image - This is a combination of pixels. Each raster image pixel is characterized by x and y coordinates and the brightness V (x, y) (for black and white images). Since pixels are discrete, their coordinates are discrete values, usually whole or rational numbers. In the case of a color image, each pixel is characterized by X and Y coordinates, and three brightness: the brightness of the red, the brightness of the blue and brightness of green colors (V R, V B, V G). Combining data three colors You can get a large number of different shades.

Note that if at least one of the characteristics of the image is not a number, then the image refers to the form analog . Examples of analog images can serve gibbies and photos. To work with such images there are special methods, in particular, optical transformations. In some cases, analog images are translated into a digital view. This task is implementing Image Processing.

The color of any pixel of the bitmap image is remembered using a bits combination. The more bits are used for this, the more shades of colors can be obtained. The gradation of brightness is usually given 1 byte (256 gradations), and 0 - black color, and 255 - white (maximum intensity). In the case of a color image, it is removed by byte on the gradation of the brightness of all three colors. It is possible to encode brightness gradation to other bits (4 or 12), but the human eye is able to distinguish between only 8 bits of gradations for each color, although special equipment may require more accurate colors. The colors described by 24 bits provide more than 16 million available colors and are often called natural colors.

In the color palette, each pixel is described by code. Supports the connection of this code with a table of colors consisting of 256 cells. The discharge of each cell is 24 discharge. At the output of each cell of 8 digits for red, green and blue.

The color space formed by the intensities of red, green and blue is represented in the form of a color cube (see Fig. 1.).

Fig. 1. Color cubic

The vertices of the Cuba A, B, C are the maximum intensities of green, blue and red, respectively, and the triangle that they form is called triangle Pascal. The perimeter of this triangle corresponds to the most saturated colors. The color of the maximum saturation contains always only two components. On the segment OD there are shades of gray, and current o corresponds to black, and point D is white.

Types of raster

Raster - This is the order of the location of the points (raster elements). In fig. 2. depicted a raster, whose elements are squares, such a raster is called rectangular, It is these rasters are most often used.

Although it is possible to use as a raster element of the figure of another shape: a triangle, hexagon; corresponding to the following requirements:

    all figures should be the same;

    must fully cover the plane without bypass and holes.

So as a raster element, it is possible to use an equilateral triangle Fig. 3, the right hexagon (hexahedron) rice. 4. You can build rasters using incorrect polygons, but there is no practical meaning in such rastors.

Fig. 3. Triangular Raster

Consider ways to build lines in a rectangular and hexagonal raster.

Fig. 4. "Hexagonal Raster"

In a rectangular raster, line construction is carried out in two ways:

    The result is an eight-society line. Neighboring pixels lines can be in one of the eight possible (see Fig. 5a) positions. The disadvantage is too thin line at an angle of 45 °.

    The result is a four-bed line. Neighboring pixels lines can be in one of four possible (see Fig. 5b) positions. The disadvantage is an excessive thick line at an angle of 45 °.

Fig. 5. Building a line in a rectangular raster

In the hexagonal raster of the six-socket line (see Fig. 6) such lines are more stable in width, i.e. The dispersion of the line width is less than in a square raster.

Fig. 6. Building a line in a hexagonal raster

One of the ways to evaluate the raster is the transmission through the communication channel of the coded, taking into account the raster used, the image with subsequent restoration and visual analysis of the quality of the quality. Experimentally and mathematically proved that hexagonal raster is better, because Provides the smallest deviation from the original. But the difference is not great.

Modeling hexagonal raster. It is possible to build a hexagonal raster based on square. For this, the hexed is represented as a rectangle.

Factors affecting the number of memory occupied by a raster image

Raster graphics files occupy a large number of computer memory. Some pictures occupy a large amount of memory due to a large number of pixels, any of which occupies some of the memory. Three facts are the greatest impact on the number of memory occupied by the raster image:

    image size;

    color bit depth;

    the format of the file used for storing the image.

There is a direct dependence of the size of the bitmap image. The more pixel in the image, the greater the file size. The permitting ability of the image on the size of the file does not affect anyone. The resolution has an effect on the file size only when scanning or editing images.

The connection between the bit depth and the size of the file is immediate. The more bits are used in the pixel, the more the file will be. The size of the raster graphics file is highly dependent on the format of the selected image. All other things being equal, such as image sizes and bit depths essential value of the image compression scheme. For example, the BMP file has, as a rule, large sizes, compared to PCX and GIF files, which in turn more JPEG file.

Many image files have their own compression schemes, may also contain additional brief description data for preview.

Dignity and disadvantages of raster graphics

Advantages:

Raster graphics effectively represent real images. The real world consists of billion of the smallest objects and the human eye is just adapted to perceive the huge set of discrete elements forming objects. At its highest level of quality - the image looks quite really like the photos in comparison with drawings look. This is true only for very detailed images usually obtained by scanning photos. In addition to the natural species, raster images have other advantages. Output devices, such as laser printers, use dots sets to create images. Raster images can be very easily printed on such printers, because computers are easy to control the output device for the presentation of individual pixels using points.

Disadvantages:

Raster images occupy a large number of memory. There is also a problem of editing raster images, as large raster images occupy significant memory arrays, then to ensure the operation of editing such images, significant memory arrays and other computer resources are also consumed.

About compression raster graphics

Sometimes the parameters of the bitmap image are recorded in this form: 1024x768x24. This means that the width of the image is 1024 pixels, height - 768 and color depth is equal to 24. 1024x768 - working resolution for 15 - 17 inch monitors. It is easy to guess that the size of the uncompressed image with such parameters will be 1024 * 768 * 24 \u003d 18874368 bytes. This is more than 18 megabytes - too much for one picture, especially if you need to store several thousand such pictures - it's not so much on computer standards. That is why computer graphics use almost always in a compressed form.

RLE (RUN LENGTH ENCODING) - Method of compression, consisting in the search for sequences of the same pixels in the raster pixels ("red, red, ..., red" is written as "N red").

LZW (Lempel-Ziv-Welch) is a more complex method, looking for repeated phrases - the same sequences of pixels of different colors. Each phrase is put in accordance with some code, when deciphering the file, the code is replaced by the original phrase.

When compressed by JPEG files (with loss of quality), the image is divided into portions of 8x8 pixels, and in each site their value is averaged. The averaged value is located in the upper left corner of the block, the rest is engaged in a smaller pixel brightness. Then most pixels are reset. When deciphering, zero pixels get the same color. Then the Huffman algorithm is applied to the image.

The Huffman algorithm is based on probability theory. First, the image elements (pixels) are sorted by the frequency of occurrence. Then the Code Tree Huffman is being built. Each element is compared code word. When the image size is desired to infinity, the maximum compression is achieved. This algorithm is also used in archivers.

Compression is also used for vector graphics, but there are no such simple patterns here, since the formats of vector files differ quite strongly in content.

Geometrical characteristics of the raster

For raster images consisting of points, the concept is of particular importance permission An expressing number of points per unit length. It should be distinguished:

    permission of the original;

    screen resolution;

    print image resolution.

Permission of the original.The original resolution is measured in dots per inch (dOTS. per. inchdPI) and depends on the quality of the image quality and the size of the file, the digitization method and creating the original illustration, a favorite file format and other parameters. In general, the rule is true: the higher the requirement for quality, the higher the original permission should be.

Open image resolution. For screen copies of the image, the elementary point of the raster is called called pixel. The size of the pixel varies depending on the selected on-screen resolution (from the range of standard values), permission of the original and display scale.

Monitors for image processing with a diagonal of 20-21 inch (professional class), as a rule, provide standard on-screen permissions 640x480, 800x600, 1024x768,1280x1024,1600x1200,1600x1280, 1920x1200, 1920x1600 points. The distance between the adjacent points of the luminofora from the quality monitor is 0.22-0.25 mm.

For a screen copy, it is enough to resolve 72 DPI, for printing on a color or laser printer 150-200 DPI, for outputting on a photo-exposure device 200-300 DPI. The empirical rule is established that when printing, the value of the original permission must be 1.5 times longer than raster linate Output devices. In the event that a hard copy is increased compared to the original, these values \u200b\u200bshould be multiplied by the scaling coefficient.

Print image resolution and linitacy concept. The size of the bitmap image is both on a solid copy (paper, film, etc.) and on the screen depends on the applied method and parameters rastric Original. When rasterizing the original, the lines mesh are superimposed, the cells of which form raster element. Raster mesh frequency is measured by the number inch Lines (Lines Per Inch - IPI) and called linitua.

The size of the raster point is calculated for each element and depends on the intensity of the tone in this cell. The greater the intensity, the denser the element of the raster is filled. That is, if absolutely black color got into the cell, the size of the raster point coincides with the size of the element of the raster. In this case, they say about 100% of the fill in. For absolutely white color, the value of the filler will be 0%. In practice, the outfinding element on the print is usually from 3 to 98%. At the same time, all points of the raster have the same optical density, ideally approaching absolutely black color. The illusion of a darker tone is created by increasing the size of the points and, as a result, reducing the space field between them at the same distance between the centers of the raster elements. Such a method is called rasterization with amplitude modulation (AM).

Thus, the resolution ability characterizes the distance between adjacent pixels (Fig. 1.). The resolution is measured by the number of pixels per unit length. The most popular unit of measure is dPI(DOTS PER INCH) - the number of pixels in one inches of length (2.54 cm). You should not identify a step with pixel size - the size of pixels can be equal to step, and it can be both less and more than a step.

Fig. 1. Raster.

The sizeraster is usually measured by the number of pixels horizontally and vertical. It can be said that for computer graphics it is often most convenient to raster with the same step for both axes, that is, dpih \u003d dpiu. This is convenient for many algorithms for the output of graphic objects. Otherwise, problems. For example, when drawing a circle on the EGA display screen (outdated model of a computer video system, its tank-rectangular, pixels are stretched in height, so it is necessary to generate an ellipse for the circle image).

Shape pixelthe raster is determined by the characteristics of the graphic output device (Fig. 1.2). For example, pixels may have a form of a rectangle or a square, which are equal to the raster (display on liquid crystals); Round-shaped pixels that in size can and not equal to the Raster step (printers).

Fig. 2. Examples of displaying the same image on various races

Tone intensity (so-called light) It is customary to divide by 256 levels. A larger number of gradations is not perceived by the vision of man and is redundant. A smaller number worsens the perception of the image (the minimum permissible for high-quality halftonus illustration is taken by the value of 150 levels). It is easy to calculate that for playback of 256 tone levels it is enough to have a raster cell size 256 \u003d 16 x 16 points.

When displaying a copy of the image on the printer or printing equipment, the raster lineture is chosen based on the compromise between the required quality, the capabilities of the equipment and the parameters of printed materials. For laser printers, the recommended linituity is 65-100 dpi, for newspaper production - 65-85 DPI, for book-magazine - 85-133 DPI, for artistic and advertising work - 133-300 DPI.

Dynamic range. The quality of the playback of the tone images is customary to evaluate dynamic range (D). it optical density, numerically equal to the decimal logarithm of the quantity bottom in the coefficient (for the originals considered "on the lumen", for example slides) or reflection coefficient(For other originals, such as printing prints).

For optical media transmitting light, the dynamic range lies in the range from 0 to 4. For surfaces reflecting the light, the value of the dynamic range is from 0 to 2. The higher the dynamic range, the greater the number of halftone is present in the image and the better the quality of its perception .

In the digital world of computer images, the term pixels indicate several different concepts. It can be a separate point of the computer screen, a separate point printed on a laser printer or a separate element of the bitmap. These concepts are not the same, so to avoid confusion, you should call them as follows: video pixel when referring to the image of the computer screen; Point when reference to a separate point created by the laser printer. There is a rectangulation coefficient of an image that is entered specifically for an image of the number of pixels of the horizontal pattern matrix and vertically.

Returning to analogy with a sheet of paper, it can be noted that any raster pattern has a certain amount of pixels in horizontal and vertical rows. There are the following rectangle rates for screens: 320x200, 320x240, 600x400, 640x480, 800x600, etc. This coefficient is often referred to as the image size. The product of these two numbers gives the total number of pixels of the image.

There is also such a concept as a rectangulation coefficient of pixels. Unlike the image rectangle coefficient, it refers to the real size of the pixel video and is the ratio of the real width to the real height. This ratio depends on the size of the display and the current permit, and therefore various values \u200b\u200btake different values \u200b\u200bon different computer systems. The color of any pixel of the bitmap image is remembered in the computer using a bits combination. The more bits are used for this, the more shades of colors can be obtained. The number of bits used by the computer for any pixel is called a bit depth of pixel. The simplest raster image consists of pixels with only two possible colors black and white, and therefore images consisting of pixels of this species are called single-bidded images. The number of available colors or grayscale gradations is 2 to an equal number of bits in pixel.

The colors described by 24 bits provide more than 16 million available colors and are often called natural colors. Raster images have a multitude of characteristics that must be organized and fixed with a computer.

The size of the image and the location of the pixels in it are two basic characteristics that the raster image file must save to create a picture. Even if information about the color of any pixel and any other characteristics, the computer will still be able to recreate the picture version, if you know how all its pixels are located. The pixel itself does not have any size, it is only a computer memory area that stores information about color, so the image rectangulation coefficient does not correspond to any real dimension. Knowing only the rectangulation coefficient of the image with some resolution can be determined by the present dimensions of the pattern. Since the size of the image is stored separately, the pixels are remembered one by one as the usual data block. The computer does not have to save individual positions, it only creates a grid in size by the specified image rectangle ratio, and then fills it with a pixel for a pixel.

Number of colors of a bitmap image

Number of flowers(color depth) is also one of the most important characteristics of the raster. The number of colors is an important characteristic for any image, and not just raster.

We classify images as follows:

    Two-color (binary) - 1 bit on pixel. Among the two-color, black and white images are most often found.

    Halftone - gradation of gray or other color. For example, 256 gradations (1 byte per pixel).

    Colorful images. From 2 bits per pixel and above. Color depth 16 bits per pixel (65,536 colors) got a name High So124 bits per pixel (16.7 million colors) - True. So1In computer graphics systems, use the greater color depth - 32, 48 or more bits per pixel.

Formats of raster graphic files

GIF. - format using the compression algorithm without loss of information LZW. Maximum color depth - 8 bits (256 colors). It also has the ability to record animation. Supports the transparency of pixels (two-level - complete transparency, or complete opacity). This format is widely used when creating Web pages. Gif-format allows you to record the image "through a line", so that, having only part of the file, you can see the image of the whole, but with a smaller resolution. It is beneficial to apply for images with a small number of colors and sharp boundaries (for example, for text images).

JPEG (JPG) - The format that uses the compression algorithm with the loss of information that allows you to reduce the file size hundreds of times. Color depth - 24 bits. No transparency of pixels is not supported. With strong compression in the area of \u200b\u200bsudden boundaries, defects appear. JPEG format is well used to compress full-color photos. Given the fact that when repeated compression there is a further deterioration of quality, it is recommended to save only the final result of the work in JPEG. JPEG is widely used when creating Web pages, as well as for storing large collections of photos.

Comparison GIF and JPEG

    GIF - the format is convenient when working with drawn pictures;

    JPEG - the format is better to use for storing photos and images with lots of colors;

    gif-format is used to create animation and images with a transparent background.

BMP. - This is the format of the Paint graphics editor. It does not apply compression. It is well suited for storing very small images - such as icons on the desktop. The greatest files in this format take too much space.

PNG. - Designed to replace GIF format. Uses the Deflate compression algorithm without information loss (improved LZW). Maximum color depth - 48 bits. Supports the channels of gradient transparency masks (256 levels of transparency). PNG is a relatively new format, and therefore is not yet very common. Mainly used in Web design. Unfortunately, even in some modern browsers (such as Internet Explorer 6), there is no support for PNG transparency and therefore it is not recommended to use transparent PNG images on Web pages.

TIFF. - Format specially designed for scanned images. Can use the compression algorithm without loss of LZW information. Allows you to save information about layers, color profiles (ICC profiles) and mask channels. Supports all color models. Hardware independent. Used in publishing systems, as well as to transfer graphics information between different platforms.

PSD. - Adobe Photoshop graphic editor format. Uses the compression algorithm without RLE information. Allows you to save all the information created in this program. In addition, due to the popularity of Photoshop, this format is supported by almost all modern editors of computer graphics. It is convenient to use it to save an intermediate result when working in Photoshop and other raster editors.

Riff. - Corel Painter graphics editor format. Allows you to save all the information created in this program. It should be used to save an intermediate result when working in Painter.

Format

Max. Bit / Pixel

Max. number of colors

Max. Image size, pixel

Compressive methods

Encoding multiple images

281 474 976 710 656

2 147 483 647 x 2 147 483 647

Deflation (LZ77 option)

tOTAL 4 294 967 295

LZW, RLE and others

Means for working with raster graphics

In the extensive class of programs for processing raster graphics, a special place is taken by Adobe Photoshop. Today, it is a standard in computer graphics, and all other programs are invariably compared to it.

The main controls of Adobe Photoshop program are concentrated in the menu bar and toolbars. The special group consists of dialog boxes - instrumental palettes:

    Palette brushes Controls the setting of editing tool parameters. The brush edit mode includes a double click on its image in the palette. Clicking when the Ctrl key is pressed, destroys the brush. Double-clicking on the free palette field open a new brushes forming a dialog box that is automatically added to the palette.

    Palette Parameters Used to edit the properties of the current tool. You can open it not only from the menu string, but also double-clicking on the tool icon in the toolbar. The composition of the controls of the palette depends on the selected tool.

    Palette info Provides information support for display tools. It presents: the current coordinates of the mouse pointer, the size of the current selected area, the color parameters of the image element and other data.

    Palette navigator Allows you to view various image fragments and change viewing. In the palette window, an image thumbnail with a selected viewing area is placed.

    Palette Synthesis Displays the color values \u200b\u200bof the current foreground colors and the background. The sliders on the color line of the corresponding color system allow you to edit these parameters.

    Palette catalog Contains a set of available colors. This kit can be downloaded and edited by adding and removing colors. The color tone of the foreground and the background is selected from the set of dialing. In the standard set of delivery of the program, several color sets are provided mainly by Pantone.

    Palette layers It serves to control the display of all layers of the image, starting from the highest. It is possible to determine the parameters of the layers, the change in their order, operations with layers using different methods.

    Palette Channels Used to highlight, create, duplicate and delete channels, determine their parameters, changes in order, convert channels to independent objects and forming combined images from multiple channels.

    Palette contours Contains a list of all created contours. When converting the contour to the selected area, it is used to form a clipping path.

    vector graphics graphics Fractal graphics Raster Image ... third order. IN general Case equation curve ... in TIFF format can be stored intelligence About masks (contours) images. ...

  • Graphics To create Web pages in Flash

    Coursework \u003e\u003e Computer Science

    ... graphics. Common It is known that vector graphics takes less space than an early used raster graphics ... but also raster Images. Using raster graphics The image is described ... given the HTML code svolen. to a minimum at the expense ...

  • Computer graphics (9)

    Cheat Sheet \u003e\u003e Informatics, Programming

    Therefore, there are often the terms "Vector GRAPHICS" and " Raster GRAPHICS". In the first case, piecewise linear ... mathematical models of elements in order to minimize common Volume information In the mathematical model of the object M. So ...

In this material, we will look at the main differences between raster and vector images. We learn all the advantages of vector and raster graphics, as well as where such graphics is better to use for its purposes. So, you probably more than once asked ourselves such a question: "What is the picture that is displayed on the screen of my computer?" Maybe you will be surprised, but in fact, the photo as such does not exist!

What is a raster image?

In fact, we see only an electronic version of the picture on the monitor. If talking pro raster imageIt is stored in the computer's memory in the form of numbers and characters. They already describe some separate area with a certain sequence. (element) The image itself. This element is displayed as a pixel. (cells of a specific color). Let's see what kind of pixel is such.

To do this, you can just take the photo and increase it. You will notice that special squares appeared. (Figure below). The image began to break into squares of different colors. These are these squares and there are pixels.

So here turns out to be any raster image obtained from the camera, from a mobile phone camera or downloaded from the Internet. Each pixel as I said is described by a specific sequence of numbers and characters. How to find out what this sequence is? Yes, very simple! Choose the tool " Pipette» (in any graphic editor he is) And look at the desired pixel. If you check in Photoshop, you will additionally need to go into the colors palette.

So, what follows from what we looked above. If the pixels are presented in the form of a sequence of numbers and letters, they can be easily changed. By changing the numbers and letters of each pixel, we can change its color, that is, edit the pixel itself. When performing any global correction operation (for example, adjust the brightness) The numeric value of several thousand pixels of the image changes.

Now let's get acquainted with the concept a vector image. To demonstrate a visual example, I will try to create a new document. Move in the menu " File» —> « Create". Let's create a vector graphics with which it can be created. For example, I will take the tool " Pen» (2) . Be sure to be setting " Layer Figure» (3) . After that, I set the points in the right places (4) . As a result, a certain figure is obtained. You can do it at your own discretion.

After we connected all the points, the figure is formed and a miniature vector mask is attached to the layer. (5) . This suggests that this is a vector figure, not raster.It can be increased and reduced many times and at the same time the quality will not suffer. Naturally, this layer can use various effects of glow, strokes, and so on.

So what is the difference between the raster from the vector image? Vector images, unlike raster, are described by mathematical formulas, and not Latin characters. Therefore, they can be increased or reduced without loss of quality. The formula remains the same, changes only the scale. The formula, as a rule, describes a smooth curve and, with any value, this curve remains smooth.

If you try to enlarge the picture with vector graphics, then you will notice that the pixels are practically invisible, that is, the quality remains at the same level. If you increase the image with raster graphics, it will noticeably lose in quality.

Thus, vector images can be increased without loss of quality. In any amount, they are described by mathematical formulas. The raster image is a pixel sequence. With an increase in some fragment, the loss of quality is beginning to be observed. Also loss can be observed and with a decrease in the picture.

Vector images good to use where a large increase in the picture is required without loss of quality. For example, it can have various business cards, logos, banners on the site and much more. Adobe Photoshop Although it allows you to work with vector pictures, but still it is a raster editor. To work with vector images, CorelDraw or Adobe Illustrator are much better suited.

So, we met with the concept of raster and vector image. As I said, the main difference: the vector image is described by mathematical formulas and it can be increased as much as possible without loss of quality, which you can not say about raster.

Although, despite this, many web designers, and not only they often use raster graphics on their sites. It is understandable, because such a graph looks much more attractive. However, there are cool examples and vector graphics. In addition, such works weigh much less. In general, learn and embarrass!