Raster graphics are images made up of pixels - small colored squares arranged in a rectangular grid. A pixel is the smallest unit of a digital image. The quality of a raster image directly depends on the number of pixels it consists of - the more pixels, the more detail can be displayed. Enlarging a raster image by stupidly increasing the scale will not work - the number of pixels cannot be increased, I think many were convinced of this when they tried to see small parts on a small digital photography, bringing it closer on the screen; As a result of this action, it was not possible to see anything other than increasing squares (that’s exactly what they are - pixels). This trick is only possible for CIA agents in Hollywood films, when they use enlarged images from an external surveillance camera to recognize car license plates. If you are not an employee of this structure and do not own such magical equipment, nothing will work out for you.

A raster image has several characteristics. For a photo stocker, the most important things are: resolution, size and color model. Sometimes the size is also called resolution and therefore confusion occurs; to prevent this from happening, you need to clearly understand what we are talking about and “look in context” - the size is measured in MP (megapixels), and resolution - dpi or ppi.

Permission is the number of pixels per inch (ppi - pixel per inch) to describe the display on the screen or the number of dots per inch (dpi - dot per inch) to describe the printing of images. There are several well-established rules: for publishing an image on the Internet, a resolution of 72ppi is used, and for printing - 300dpi(ppi). Microstock image requirements are 300dpi, since many works are purchased specifically for printing.

Size- the total number of pixels in an image, usually measured in MP (megapixels), this is simply the result of multiplying the number of pixels in height by the number of pixels in width of the image. That is, if the photo size is 2000x1500, then its size will be 2000*1500=3,000,000 pixels or 3MP. To send to photo banks, the image size should not be less than 4 megapixels, and in the case of illustrations - no more than 25 megapixels.

Color model- characteristic of an image that describes its representation based on color channels. I know of 4 color models - RGB (red, green and blue channels), CMYK (cyan, magenta, yellow and black), LAB (lightness, red-green and blue-yellow) and Grayscale (grayscale). All microstocks accept raster graphics in the RGB color model.

Advantages of raster graphics:

  1. Ability to reproduce images of any complexity level. The amount of detail reproduced in an image largely depends on the number of pixels.
  2. Accurate reproduction of color transitions.
  3. Availability of many programs for displaying and editing raster graphics. The vast majority of programs support the same raster graphics file formats. Raster representation is perhaps the “oldest” way of storing digital images.

Disadvantages of raster graphics

  1. Large file size. In fact, for each pixel it is necessary to store information about its coordinates and color.
  2. Impossibility of scaling (in particular, enlarging) an image without losing quality.

Raster graphics formats

Despite the apparent simplicity of the presentation of raster graphics, there are “wagons and small carts” in their formats! And their number continues to change - some formats are becoming obsolete, others are just beginning to be developed. Describing everything would be long and not interesting; I will only describe those that, in my opinion, may be of interest to designers and photostockers.

PNG(Portable Network Graphics) is another raster graphics format that supports transparency, not only regular transparency like GIF, but also translucency - a smooth transition of color into a transparent area. The purpose of creating PNG was precisely to replace GIF, since the company CompuServe, the developer of the GIF format, in 1995 patented the compression algorithm used to create GIF images for 10 years, which made it impossible to use for free of this format in commercial projects.

Advantages of PNG:

  1. The ability to create a full-color image with color transitions and halftones.
  2. Preservation graphic information using a lossless compression algorithm.
  3. The ability to use alpha channels, that is, simply put, transparency and, moreover, translucency, which allows you to create smooth color transitions into a transparent area.

PNG, in my opinion, has only 2 disadvantages:

  1. Inability to create an animated image
  2. Ambiguous “understanding” of transparency PNG format Internet browsers. Some browsers are mostly outdated versions, refuse to display transparent areas of the PNG image and paint them gray. But this drawback, 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 color depth changes, and supports working with layers. Storing information in TIFF format possible both with and without losses. Cameras that do not support RAW format can sometimes take photos in TIFF format.

On photo banks that have the ability to upload additional formats to the main image in JPEG format (Dreamstime.com, iStock.com), you can upload TIFF as an additional one.

The disadvantage of the format is the large weight of the file, much larger than a RAW file of the same quality - each image in TIFF weighs from 8 to 20 MB.

RAW(translated from English “raw” - raw)

The RAW format appeared thanks to digital cameras. RAW is essentially a “print” that remains on the camera’s matrix at the time of shooting, or rather as many as 3 prints - in red, green and blue. In addition to these prints, the RAW file also stores some other data, which in this case is more of a reference nature, dictating to the RAW converter with what intensity to display each of the color channels for different pixels on the screen - this is white balance, color space, etc. . Changing these parameters will not affect the original information in any way; you can change them painlessly and return to the original view at any time. It will be much more problematic to work with another raster format obtained as a result of export. Extensions for files in RAW format can be different (.cr2, .crw, .nef, etc.) depending on the brand of the camera - each camera manufacturer has its own way of storing information. To edit RAW files and convert them to other raster formats, camera manufacturers supply their own software, and the Canon RAW converter will only read RAW files shot with Canon cameras (.cr2,.crw) and will not be able to read the RAW file shot Nikon camera(.nef). There are third-party RAW converters that work with most RAW files. In general, the lack of a unified standard creates certain inconveniences when working with this format.

The disadvantages of the format are the large file size (although not as large as TIFF) and the lack of a uniform standard for generating RAW files for all manufacturers of photographic equipment.

RAW, like TIFF, can be sent to photo banks as an “additional” image format - the availability of the source can influence the designer’s decision to purchase the image.

JPEG(Joint Photographic Experts Group - the name of the developer) is the most common raster graphics format (at least on the Internet). JPEG is an example of the use of “lossy” or, in other words, “distorting compression” compression algorithms; it is most suitable for storing paintings, photographs and other realistic images with smooth color transitions, but is practically not suitable for drawings and diagrams, that is for images with sharp transitions, the compression algorithm will produce noticeable artifacts in places of sharp contrast.

It is not recommended to store in this format intermediate options work - each “resave” will lead to irreversible loss of part of the information. The compression algorithm used in this format (lossy compress) is based on “averaging” the color of adjacent pixels.

JPEG does not support working with alpha channels, that is, it cannot contain transparent pixels, but it allows you to save a clipping path in the file, which in the case of working with photo banks must be noted in the description, the presence of a clipping path (if, of course, you have made it and know what is this) - this is important information for the buyer of the image.

JPEG format- also the main format in which photo banks accept raster images (photos and illustrations) for sale. The final version of the file sent to the microstock must be saved in the RGB color model, with a resolution of 300dpi and, of course, in 100% quality. You can also enter IPTC information into the file (name, description, keywords) - the JPEG format allows you to do this and it will significantly save you time when sending images to several photo banks.

Except common formats raster graphics (GIF, JPEG, TIFF, etc.), which are “readable” by all graphic editors and image viewers, there are “native” formats of almost every editor, which can only be opened by the program in which they were made, for example, the .PSD format Adobe programs Photoshop. When processing photographs, raster illustrations and design development, intermediate versions should be saved in such formats and only the final versions should be translated into JPEG. This is necessary so that you can save the results of your work without losing information and make changes to the image or project at any time.

Raster graphics

Raster graphics, general information. Raster representations of images. Types of rasters. Factors that affect the amount of memory consumed by a bitmap image. Advantages and disadvantages of raster graphics. Geometric characteristics of the raster (resolution, raster size, pixel shape). The number of colors in the bitmap. Tools 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 colored dot.

basis raster graphics representation is pixel(dot) indicating its color. When describing, for example, a red ellipse on a white background, you must indicate the color each ellipse and background points. The image is represented as a large number of dots - the more there are, the visually better the image and the larger the file size. Those. one or even a picture can be presented with better or worse quality in accordance with the number of dots per unit length – resolution(usually dots per inch - dpi or pixels per inch - ppi).

Raster images resemble a sheet of checkered paper, on which each cell is painted either black or white, together forming a pattern. Pixel– the main element of raster images. It is these elements that make up a raster image, i.e. raster graphics describe images using colored dots ( pixels), located on the grid.

When editing raster graphics, you are editing pixels, but not lines. Raster graphics are resolution-dependent because information describing the image is attached to a grid of a specific size. When editing raster graphics, the quality of its presentation may change. In particular, resizing raster graphics can cause the edges of the image to become frayed as the pixels are redistributed on the grid. Outputting raster graphics to devices with a lower resolution than the resolution of the image itself will reduce its quality.

In addition, quality is also characterized by the number of colors and shades that each point in the image can take on. The more shades an image is characterized by, the more digits are required to describe them. Red can be color number 001, or it can be 00000001. Thus, the higher the quality of the image, the larger the file size.

Raster representation is typically used for photographic-type images with a lot of detail or shading. Unfortunately, scaling such images in any direction usually degrades the quality. When the number of dots is reduced, small details are lost and the inscriptions are deformed (although this may not be so noticeable if the visual size of the image itself is reduced - i.e., the resolution is maintained). Adding pixels leads to a deterioration in the sharpness and brightness of the image, because new points have to be given shades that are average between two or more adjacent colors.

Using raster graphics, you can reflect and convey the entire gamut of shades and subtle effects inherent in a real image. A raster image is closer to a photograph; it allows you to more accurately reproduce the main characteristics of a photograph: illumination, transparency and depth of field.

Most often, raster images are obtained by scanning photographs and other images, using a digital camera, or by “capturing” a frame from a video. Raster images can also be obtained directly in raster or vector graphics programs by converting vector images.

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

Raster image representations

Pixel– the main element of raster images. These are the elements that make up a raster image.

Digital image is a collection of pixels. Each pixel of a raster image is characterized by x and y coordinates and brightness V(x,y) (for black and white images). Since pixels are discrete in nature, their coordinates are discrete quantities, usually integers or rational numbers. In the case of a color image, each pixel is characterized by x and y coordinates, and three brightnesses: red brightness, blue brightness and green brightness (VR, V B, V G). By combining these 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 belongs to the form analog . Examples of analogue images include halograms and photographs. To work with such images, there are special methods, in particular, optical transformations. In some cases, analog images are converted to digital view. This task is carried out by Image Processing.

The color of any pixel in a raster image is stored using a combination of bits. The more bits used for this, the more shades of colors can be obtained. 1 byte is usually allocated for brightness gradation (256 gradations), with 0 being black and 255 being white (maximum intensity). In the case of a color image, a byte is allocated for the gradation of brightness of all three colors. It is possible to encode gradations of brightness with a different number of bits (4 or 12), but the human eye is capable of distinguishing only 8 bits of gradations for each color, although special equipment may require more accurate color reproduction. Colors described in 24 bits provide more than 16 million available colors and are often called natural colors.

In color palettes, each pixel is described by a code. The connection of this code with a color table consisting of 256 cells is supported. The capacity of each cell is 24 bits. The output of each cell is 8 bits 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.).

Rice. 1. Color Cube

The vertices of the cube A, B, C are the maximum intensities of green, blue and red respectively, and the triangle they form is called Pascal's triangle. The perimeter of this triangle corresponds to the maximum rich colors. The color of maximum saturation always contains only two components. On the segment OD there are shades of gray, with current O corresponding to black, and point D to white.

Types of rasters

Raster– this is the order of arrangement of points (raster elements). In Fig. 2. a raster is shown, the elements of which are squares, such a raster is called rectangular, these are the rasters that are most often used.

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

    all figures must be the same;

    should completely cover the plane without running over or holes.

Thus, it is possible to use an equilateral triangle in Fig. 1 as a raster element. 3, regular hexagon (hexahedron) Fig. 4. You can build rasters using irregular polygons, but there is no practical meaning in such rasters.

Rice. 3. Triangular raster

Let's look at ways to construct lines in a rectangular and hexagonal raster.

Rice. 4. “Hexagonal raster”

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

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

    The result is a four-connected line. Adjacent pixels of a line can be in one of four possible (see Fig. 5b) positions. The disadvantage is that the line is too thick at an angle of 45°.

Rice. 5. Drawing a line in a rectangular raster

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

Rice. 6. Drawing a line in a hexagonal raster

One of the ways to evaluate a raster is to transmit over a communication channel a coded image, taking into account the raster used, with subsequent restoration and visual analysis of the achieved quality. It has been experimentally and mathematically proven that the hexagonal raster is better, because provides the smallest deviation from the original. But the difference is not big.

Modeling a hexagonal raster. It is possible to construct a hexagonal raster based on a square one. To do this, a hexagon is represented as a rectangle.

Factors that affect the amount of memory consumed by a bitmap

Raster graphics files take up a large amount of computer memory. Some pictures take up a lot of memory because they have a large number of pixels, each of which takes up some of the memory. Three facts have the greatest impact on the amount of memory occupied by a raster image:

    image size;

    bit color depth;

    The file format used to store the image.

There is a direct relationship with the size of the bitmap image file. The more pixels there are in an image, the larger the file size. The image resolution does not affect the file size in any way. Resolution only affects file size when scanning or editing images.

The relationship between bit depth and file size is direct. The more bits used in a pixel, the larger the file will be. The size of a raster graphics file depends greatly on the image format chosen for storage. All other things being equal, such as image size and bit depth, the image compression scheme is essential. For example, a BMP file is usually larger in size compared to PCX and GIF files, which in turn are larger than a JPEG file.

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

Advantages and disadvantages of raster graphics

Advantages:

Raster graphics effectively represent real-life images. The real world consists of billions of tiny objects, and the human eye is precisely designed to perceive a huge set of discrete elements that form objects. At their highest level of quality, the images look quite real, similar to how photographs look compared to drawings. This is only true for highly detailed images, usually obtained by scanning photographs. Besides their natural appearance, raster images have other advantages. Output devices such as laser printers use patterns of dots to create images. Raster images can be printed very easily on such printers because it is easy for computers to control the output device to represent individual pixels using dots.

Flaws:

Bitmap images take up a large amount of memory. There is also the problem of editing raster images, since large raster images occupy significant amounts of memory, and to ensure the operation of editing functions for such images, significant amounts of memory and other computer resources are also consumed.

About raster graphics compression

Sometimes the characteristics of a raster image are written in this form: 1024x768x24. This means that the image width is 1024 pixels, the height is 768 and the color depth is 24. 1024x768 is the working resolution for 15 - 17 inch monitors. It’s easy to guess that the size of an uncompressed image with these parameters will be 1024*768*24 = 18874368 bytes. This is more than 18 megabytes - too much for one picture, especially if you need to store several thousand of these pictures - this is not so much by computer standards. This is why computer graphics are almost always used in compressed form.

RLE (Run Length Encoding) is a compression method that consists of searching for sequences of identical pixels in the lines of a raster image (“red, red, ..., red” is written as “N red”).

LZW (Lempel-Ziv-Welch) is a more complex method that searches for repeating phrases - identical sequences of pixels of different colors. Each phrase is associated with a certain code; when decrypting the file, the code is replaced by the original phrase.

When JPEG files are compressed (with lossy quality), the image is divided into 8x8 pixel sections, and their value is averaged in each section. The average value is located in the upper left corner of the block, the rest of the space is occupied by pixels of lower brightness. Most pixels are then reset to zero. When decrypted, zero pixels receive the same color. The Huffman algorithm is then applied to the image.

The Huffman algorithm is based on probability theory. First, image elements (pixels) are sorted by frequency of occurrence. Then a Huffman code tree is built from them. Each element is associated with a code word. As the image size tends to infinity, 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 vector file formats differ quite significantly in content.

Geometric characteristics of the raster

For raster images consisting of dots, the concept is of particular importance permissions, expressing the number of points per unit length. It is necessary to distinguish between:

    original resolution;

    screen image resolution;

    resolution of the printed image.

Original resolution. Original resolution is measured in dpi (dots per inchdpi) and depends on the requirements for image quality and file size, the method of digitizing and creating the original illustration, the selected file format and other parameters. In general, the rule applies: the higher the quality requirement, the higher the resolution of the original should be.

Screen resolution. For screen copies of an image, the elementary raster point is usually called pixel. Pixel size varies depending on the selected screen resolution(from the range of standard values), original resolution and display scale.

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

For a screen copy, a resolution of 72 dpi is sufficient, for printing on color or laser printer 150–200 dpi, for output on a photo exposure device 200–300 dpi. A rule of thumb has been established that when printing, the resolution of the original should be 1.5 times greater than raster lineature output devices. In case the hard copy will be enlarged compared to the original, these values ​​should be multiplied by the scaling factor.

Printed image resolution and the concept of lineature. The dot size of a raster image both on a hard copy (paper, film, etc.) and on the screen depends on the method and parameters used rasterization original. When rasterizing, a grid of lines is superimposed on the original, the cells of which form raster element. The raster grid frequency is measured by the number lines per inch (Ipi) and is called lineature.

The raster dot size is calculated for each element and depends on the tone intensity in a given cell. The higher the intensity, the denser the raster element is filled. That is, if the cell contains absolutely black color, the size of the raster point will coincide with the size of the raster element. In this case, they talk about 100% occupancy. For a completely white color, the fill value will be 0%. In practice, element occupancy on a print usually ranges from 3 to 98%. In this case, all raster points have the same optical density, ideally approaching absolute black. The illusion of a darker tone is created by increasing the size of the dots and, as a result, reducing the white space between them with the same distance between the centers of the raster elements. This method is called rasterization amplitude modulation (AM).

Thus, resolution characterizes the distance between adjacent pixels (Fig. 1.). Resolution is measured by the number of pixels per unit length. The most popular unit of measurement is dpi(dots per inch) – the number of pixels in one inch of length (2.54 cm). The pitch should not be equated with the pixel size - the pixel size can be equal to the pitch, or it can be either smaller or larger than the pitch.

Rice. 1. Raster.

Size A raster is usually measured by the number of horizontal and vertical pixels. It can be said that for computer graphics Often the most convenient raster is with the same pitch for both axes, that is, dpiХ = dpiУ. This is convenient for many algorithms for displaying graphic objects. Otherwise - problems. For example, when drawing a circle on an EGA display screen (an outdated model of a computer video system, its raster is rectangular, the pixels are stretched in height, so an ellipse must be generated to depict the circle).

Pixel Shape raster is determined by the features of the graphic output device (Fig. 1.2). For example, pixels may have the shape of a rectangle or square, which are equal in size to the raster pitch (liquid crystal display); round pixels, which in size may not be equal to the raster pitch (printers).

Rice. 2. examples of displaying the same image on different rasters

Tone intensity(so-called lightness) It is customary to divide it into 256 levels. A larger number of gradations is not perceived by human vision and is redundant. A smaller number worsens the perception of the image (the minimum acceptable value for a high-quality halftone illustration is 150 levels). It is easy to calculate that to reproduce 256 tone levels it is enough to have a raster cell size of 256 = 16 x 16 pixels.

When outputting a copy of an image on a printer or printing equipment, the raster lineature is chosen based on a compromise between the required quality, the capabilities of the equipment and the parameters of the printed materials. For laser printers, the recommended lineature is 65–100 dpi, for newspaper production – 65–85 dpi, for book and magazine printing – 85–133 dpi, for artistic and advertising works – 133–300 dpi.

Dynamic range. The quality of tone image reproduction is usually assessed dynamic range (D). This optical density, numerically equal to the decimal logarithm of the reciprocal transmittance (for originals held up to the light, such as slides) or reflection coefficient(for other originals, such as printed prints).

For optical media that transmit light, the dynamic range ranges from 0 to 4. For surfaces that reflect light, the dynamic range value ranges from 0 to 2. The higher the dynamic range, the more halftones are present in the image and the more better quality his perception.

In the digital world of computer imaging, the term pixel refers to several different concepts. This could be a single point on a computer screen, a single point printed on a laser printer, or separate element raster image. These concepts are not the same thing, so to avoid confusion they should be called as follows: video pixel when referring to an image of a computer screen; dot when referring to a single dot produced by a laser printer. There is an image rectangularity coefficient, which is introduced specifically to depict the number of pixels of the pattern matrix horizontally and vertically.

Returning to the analogy with a sheet of paper, you can see that any raster image has a certain number of pixels in horizontal and vertical rows. There are the following rectangularity coefficients for screens: 320x200, 320x240, 600x400, 640x480, 800x600, etc. This coefficient is often called the image size. The product of these two numbers gives the total number of pixels in the image.

There is also such a thing as the pixel squareness coefficient. Unlike the image squareness ratio, it refers to the actual video pixel dimensions and is the ratio of the actual width to the actual height. This coefficient depends on the display size and current resolution, and therefore at different computer systems takes on different meanings. The color of any pixel in a raster image is stored in the computer using a combination of bits. The more bits used for this, the more shades of colors can be obtained. The number of bits the computer uses for any given pixel is called the pixel bit depth. The simplest raster image consists of pixels with only two possible colors, black and white, and therefore images consisting of pixels of this type are called single-bit images. The number of available colors or shades of gray is 2 to the power of the number of bits per pixel.

Colors described in 24 bits provide more than 16 million available colors and are often called natural colors. Raster images have many characteristics that must be organized and captured by the computer.

The dimensions of an image and the arrangement of its pixels are two of the main characteristics that a raster image file must store in order to create an image. Even if the information about the color of any pixel and any other characteristics is corrupted, the computer will still be able to recreate a version of the drawing if it knows how all its pixels are located. A pixel itself does not have any size, it is just an area of ​​​​computer memory that stores color information, so the squareness coefficient of the image does not correspond to any real dimension. Knowing only the rectangularity coefficient of the image with a certain resolution, you can determine the real dimensions of the picture. Since the image dimensions are stored separately, the pixels are stored one by one, just like a regular block of data. The computer doesn't have to store individual positions, it just creates a grid to fit the image's given squareness factor, and then fills it in pixel by pixel.

Number of bitmap colors

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

We classify images as follows:

    Two-color(binary) – 1 bits per pixel. Among two-color images, black and white images are most common.

    Halftone– gradations of gray or other colors. For example, 256 gradations (1 byte per pixel).

    Color images. From 2 bits per pixel and above. Color depth of 16 bits per pixel (65,536 colors) is called HighCo1og, 24 bits per pixel (16.7 million colors) – TrueCo1og. In computer graphics systems They also use greater color depth - 32, 48 or more bits per pixel.

Raster graphics file formats

GIF– a format that uses the LZW lossless compression algorithm. The maximum color depth is 8 bits (256 colors). It also has the ability to record animation. Supports pixel transparency (two-level - full transparency or full opacity). This format is widely used when creating Web pages. The GIF format allows you to record an image “through a line”, thanks to which, having only part of the file, you can see the entire image, but with a lower resolution. It is advantageous to use for images with a small number of colors and sharp edges (for example, text images).

JPEG (JPG)– a format that uses a lossy compression algorithm that allows you to reduce the file size by hundreds of times. Color depth – 24 bit. Pixel transparency is not supported. With strong compression, defects appear in the area of ​​sharp boundaries. The JPEG format is good for compressing full-color photographs. Given that re-compression causes further degradation in quality, it is recommended to save only the final result of the work as JPEG. JPEG is widely used when creating Web pages, as well as for storing large collections of photographs.

Comparison of GIF and JPEG

    GIF – format is convenient when working with hand-drawn pictures;

    JPEG – the format is best used for storing photographs and images with a large number of colors;

    to create animations and images with transparent background GIF format is used.

BMP is a format of the Paint graphic editor. It does not use compression. It is well suited for storing very small images - such as desktop icons. Large files in this format take up too much space.

PNG– designed to replace the GIF format. Uses the Deflate lossless compression algorithm (enhanced LZW). The maximum color depth is 48 bits. Supports gradient transparency mask channels (256 levels of transparency). PNG – relative new format, and therefore is not yet very widespread. 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– a format specially designed for scanned images. Can use the LZW lossless compression algorithm. 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 for transferring graphic information between different platforms.

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

RIFF– format of the graphic editor Corel Painter. Allows you to save all information created in this program. It should be used to save intermediate results when working in Painter.

Format

Max. number of bits/pixel

Max. number of colors

Max. image size, pixel

Compression methods

Encoding Multiple Images

281 474 976 710 656

2,147,483,647 x 2,147,483,647

Deflation (variant LZ77)

total 4,294,967,295

LZW, RLE and others

Tools for working with raster graphics

Adobe's Photoshop package occupies a special place in the broad class of programs for processing raster graphics. Today it is the standard in computer graphics, and all other programs are invariably compared to it.

The main controls of Adobe Photoshop are located in the menu bar and toolbar. A special group consists of dialog boxes – tool palettes:

    Palette Brushes controls settings for editing tools. A brush enters editing mode after double-clicking on its image in the palette. CTRL-clicking destroys the brush. Double-clicking on a free field of the palette opens a dialog box for creating a new brush, which is automatically added to the palette.

    Palette Options serves to edit the properties of the current tool. You can open it not only from the menu bar, but also double click on the tool icon in the toolbar. The composition of the palette controls 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 different parts of the image and change the viewing scale. The palette window contains a thumbnail of the image with a selected viewing area.

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

    Palette Catalog contains a set of available colors. This set can be downloaded and edited by adding and removing colors. The color tone of the foreground and background is selected from the set. The standard package of the program includes several color sets, mainly from Pantone.

    Layers Palette serves to control the display of all layers of the image, starting from the top one. It is possible to determine the parameters of layers, change their order, and operate on layers using different methods.

    Channels Palette used to select, create, duplicate and delete channels, determine their parameters, change the order, convert channels into independent objects and generate combined images from several channels.

    Palette Contours contains a list of all created contours. When you convert a path to a selection, it is used to form a clipping path.

    Graphics Vector graphic arts Fractal graphic arts Raster image... third order. IN in general In this case, the equation of a curve... can be stored in TIFF format intelligence about masks (contours) of images. ...

  • Graphic arts to create Web pages in Flash

    Coursework >> Computer Science

    ... graphics. General it is known that vector graphic arts takes up less space than previously used raster graphic arts... but also raster Images. Using raster graphics the image is described... in this case the HTML code mixed to a minimum due to...

  • Computer graphic arts (9)

    Cheat sheet >> Computer science, programming

    Therefore, the terms “VECTOR” are often found GRAPHIC ARTS" And " RASTER GRAPHIC ARTS". In the first case, piecewise linear... mathematical models of elements are performed in order to minimize general volume information in the mathematical model of the object M. Thus...

A raster image is a collection of colored dots (usually rectangular) on a monitor, paper, or other display devices and materials.

Each dot of a raster image is so small that it is not perceived by the eye as a separate object, but a collection of dots is perceived as a single image. This imaging technology is very similar to mosaic.

An example of a raster image can be seen in a newspaper or magazine: any photograph in them consists of an array of dots of different colors and sizes, invisible at first glance. The television image and the view on the monitor screen are also a raster, only, unlike printing on paper, the raster dot of a computer image is square (Fig. 8.3).

A point in a raster image is referred to as a pixel.

Rice. 8.3.

Pixel

Let us recall that the term "pixel" ("pixel") (from the English. pixel, pel – abbreviation from English pix element , picture cell , picture element image element) has two meanings:

  • 1) the smallest element of a two-dimensional digital image in raster graphics;
  • 2) a “physical” element of the matrix of displays that form the image. A pixel is an indivisible object of a rectangular or round shape, characterized by a certain color (in relation to plasma panels).

A raster computer image consists of pixels arranged in rows and columns. The more pixels per unit area an image contains, the more detailed it is.

Each pixel in a raster image is an object characterized by a specific color, brightness, and possibly transparency, or a combination of these values. One pixel can store information about only one color, which is associated with it (in some computer systems, color and pixels are represented as two separate objects).

A pixel is also the smallest unit of a raster image produced using graphic display systems ( computer monitors, printers, etc.). The resolution of such a device is determined by the horizontal and vertical dimensions of the output image in pixels. The color of pixels displayed on color monitors consists of triads (subpixels of red, green and blue colors located next to each other in a certain sequence).

GOST 27459–87 "Information processing systems. Computer graphics. Terms and definitions" and the term "pixel" means "the smallest element of the visualization surface, to which the color, intensity and other characteristics of the image can be independently specified."

Characteristics of a bitmap image

Raster images are characterized by the following parameters:

  • number of pixels – the number of pixels in width and height can be indicated separately (1024 x 768, 640 x 480, etc.) or the total number of pixels;
  • permission – a value indicating the possible size and detail of the image;
  • number of colors used or color depth;
  • color mode – grayscale, indexed, RGB, CMYK, etc.;
  • color space (color model ) – RGB, CMYK, LAB, HSV, etc.

Rice. 8.4.

The quality of a raster image depends on the number of raster dots it consists of (Fig. 8.4). The main indicator of quality is image resolution, i.e. number of points per unit length (inch, mm, cm). Most often the number of dots per inch (dpi) is measured. dots per inch) . A larger number of dots gives greater detail to the image, however, when saving such an image, it is necessary to save information about the color of each dot, and since there can be up to several million dots, the size of the saved file will also be large.

The maximum detail of a raster image is set when it is created and cannot be increased. Without any significant losses, raster images can only be reduced. When raster images are enlarged, the pixels turn into enlarged squares of one color or another.

Raster graphics are created using cameras, scanners, directly in a raster editor, as well as by exporting from a vector editor or in the form of screenshots.

06. 07.2017

Blog of Dmitry Vassiyarov.

What is raster graphics and where is it used?

Hello.

In this article we will talk about what raster graphics are, what are their main characteristics, where they are found, and in what formats they are most often presented. Every person, one way or another, encounters this type of computer graphics every day, so it’s worth learning more about it.

Understanding the concepts

Let's start with the definition of such a thing as raster graphics: these are images consisting of many small squares collected into one rectangular network.

Squares are pixels (they are also called dots) - the smallest unit of measurement of a digital image; and the higher their number, the greater the number of details the file contains, which means the better quality it is.

As you already guessed, raster images primarily include photographs. Try to enlarge them as much as possible, and you will see the described squares.

Difference with pixel graphics

Despite the fact that the main element in raster graphics is pixels, they should not be confused with pixel graphics. The latter is also formed on their basis, but such images are created exclusively on a computer using raster editors. They have such a low resolution that the pixels are clearly visible.

To roughly generalize, you can find raster graphics in realistic images, and pixel graphics in those made on a computer, with clearly defined squares. But in essence, it is the same thing.

Difference from vector graphics

There is another type of computer graphics - - from which you should learn to distinguish raster graphics. Vector images do not consist of dots, but of lines and other primitive geometric elements, formulas and calculations.

They are created in special programs and are used in writing layouts, drawings, diagrams, maps, etc.

With little detail, vector drawings have much less weight than raster ones. The fact is that the first files do not store full information about the content, like the latter, but only the coordinates of the picture, according to which it is recreated when opened.

Let's say to draw a square, you specify the coordinates of the corners, the fill and stroke colors. When closing the editor, only this data is saved in the file. And when you want to open it again, the program will reproduce your works according to them.

Also, unlike raster images, vector images can be scaled to any size without loss of quality.

Characteristics of raster images

The main properties of raster images are:

  • Permission. Shows how many pixels there are per unit area. The measurement is most often made in dots per inch - dpi. The higher this number, the better the image quality. For posting on the Internet, 72-100 dpi is enough, and for printing on paper - at least 300 dpi.

  • Size. Do not confuse it with the previous parameter, as many do. This characteristic indicates the total number of pixels in the image or the exact number of pixels in width and height. For example, a 1600x1200px image contains a total of 1,920,000 pixels, which is roughly 2 megapixels.
    As a rule, photo banks accept photos of a maximum of 4 megapixels, and for illustration - 25 megapixels.

  • Color space. A way to display colors in coordinates. That is, each color is represented by a dot, having its own location in the palette. If you have dealt with Photoshop, you may have noticed that when you select a shade, its exact coordinates are displayed. This is what we are talking about.
    The color model comes in the following types: RGB, CMYK, YCbCr, XYZ, etc.

  • Color depth. Calculated by the formula: N = 2ᵏ, where N is the number of colors, and k is the depth. Indicates how many bits are in each pixel's color. Depends on maximum number shades that the image may contain. The larger it is, the more accurate the picture will be.

Advantages and disadvantages

Raster graphics have the following advantages:

Realism. With its help, images of any complexity are created, including many details, smooth transitions from one shade to another.

  • Popularity. This type of graphics is used everywhere.
  • Possibility of automated information entry. For example, when you use a scanner to make a digital copy from a real photograph.
  • Fast processing of complex images. True, except for cases when strong magnification is required.
  • Adaptation for various devices input-output (monitors, printers, cameras, phones, etc.), as well as for many viewing programs. By the way, you can create and edit raster files in programs such as Adobe PhotoShop, Corel PhotoPaint, Ulead PhotoImpact GIMP, etc.

There are also negative sides:

  • Large weight of images.
  • Impossibility of enlarging without reducing quality (pixels appear);
  • Inability to reduce without losing detail.

Raster image formats

The format is essentially what you see in the image title after the dot (.jpeg, .png, .raw, etc.). It is also called extension, which many confuse with resolution due to the similarity in sound.

I'll tell you about the main raster graphics formats:

  • JPEG (Joint Photographic Experts Group - manufacturer's name). The most common extension. This is where photographs are most often saved. But JPEG is not suitable for storing drawings and other images with sharp transitions, as they will show strong contrast. Also, do not save unfinished work in it, because with each new edit you will lose quality.

  • RAW. Translated from English as “raw”, which reflects the essence of this format. Professional photographers most often shoot in it, so that later they can carry out deep processing of the frames. RAW is like a print in the RGB palette (red, green and blue channel) on the camera matrix.
    When outputting to a computer via special program this “negative” indicates with what intensity the mentioned colors should be conveyed for certain pixels, determines the white balance, stores the settings of photographic equipment at the time of shooting the exported frame, etc.

  • TIFF (Tagged Image File Format). An alternative to the previous option. Some cameras that do not support RAW can take photos in this format. It saves very high quality images with any color models. But you have to pay for this with too large files (from 8 to 20 MB).



It is increasingly replacing the previous format, since it uses the same compression algorithm, but does not reduce quality and displays all colors.

However, it does not support animation.

That's all. What is raster graphics? I think I’ve sanctified it?

See you on the pages of my blog.

Often, in one way or another, touching on the issue of web or print design, we come across the concepts of raster and vector graphics. In this post I will try to explain in as much detail and clearly as possible what it is, where it is used and why it is needed.

Raster graphics

We constantly come across examples of raster graphics in life: the picture on a TV, 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 a minimal, indivisible unit. In raster graphics, this minimal unit is usually called a “pixel”. Any raster image consists of many 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 looking at the file extension, you can often immediately understand that they contain raster images.

Raster graphics formats

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

Raster graphics editors

There are quite a lot of them, but the main ones are Photoshop and Paint brush (the 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 main disadvantage of raster graphics is the loss of quality when the image is enlarged. What happens when you stretch a bitmap: between existing pixels graphics editor raster graphics creates additional ones, and color applies the average with the associated pixels. As a result, we get a “blurry”, not clear image. In addition, raster graphics files are larger in size compared to vector graphics files.
If we talk about photographs or images in which it is necessary to convey photographic quality with halftones, there is no alternative to the solution format.

Vector graphics

If you are not a designer, then you come across examples of vector graphics much less often. Most often, vector graphics are used to create layouts, most common in print design. Vector graphics cannot convey tones and halftones, but is much more convenient when it comes to simple forms, texts, contour figures. The principle of vector graphics: any contour is defined using anchor points, and the entire space of the work area is a coordinate system. Any figure in such a space is described by the coordinates of the reference points, connecting segments between them and the filling characteristics (color, gradient, pattern) of the surface inside. Those. any vector image is primarily a mathematical formula.

Vector graphics formats

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

Vector graphics editors

The most common vector graphics editors are CorelDraw and Illustrator. But there is another important exception that appeared just a few years ago. In Photoshop (originally raster editor), it is now possible to use a vector. Therefore, Photoshop can be simultaneously classified as both a raster graphics editor and a vector graphics editor. I recommend reading a separate post about this, where I talk in detail about vector tools.

Disadvantages and limitations of vector graphics

I repeat that vector graphics are quite specialized. There is no question what it can replace raster format. Vector graphics are not capable of conveying tones and halftones like a photographic image and serve other purposes.

Advantages of the vector format

Any image in vector format can be easily scaled both smaller and larger. big side without loss of quality. What happens when scaling a vector image: because... a vector image is a mathematical expression; when enlarged or reduced, the program recalculates the coordinates of the reference points and “redraws” the image anew. Therefore, it is the vector format that is usually used by designers when developing a logo. The customer can always change the vector logo without losing quality (at least enlarge it to a banner and wrap his office 10 times). Not an unimportant advantage vector format It is also possible to quickly correct color in just a couple of clicks (since the color is also set by a digital value) and completely small size files (the mathematical formula describes only the reference points, and not each pixel of the workspace).

New prospects are opening up for vector images with the advent SVG format which is beginning to be widely used in web design. Modern browsers already support this graphic format, which allows you to scale images in SVG without losing quality, which is important, for example, when the site is responsive.