Today we will talk about raster graphics . Its
main differences from the vector, the pros and cons, the scope. A raster
image is an image representing a grid of pixels on a computer monitor.
It is easiest to understand this by imagining a
regular tetrad sheet in a cage. Now mentally "paint over" some
cells with color - this will be an array of information; to describe it, you
need to know 2 parameters: position in space and color.
If we work a little more and take a look at 100 such painted cells from a long distance, then instead of cells we will see a whole image; this is how the bitmap is formed.
Important characteristics for such images are:
- Number of pixels - resolution. They can be specified
separately in width and height (640x480; 1024x768), but sometimes the total
number of pixels is indicated.
- Color space (color model) RGB, CMYK, XYZ, YCbCr, etc.
- Number of colors used or color depth (these
characteristics have the following relationship: N = 2 I ,
where N is the number of colors, and I is the color depth)
To edit bitmap images use bitmap graphic editors (Adobe Photoshop, CorelDraw, etc.). Raster graphics are created by cameras, scanners, editors and by exporting from a vector editor.
Advantages:
- Prevalence. Raster graphics are used almost
everywhere. Look around (smile)
- Raster image representation is understandable to many graphic
information input / output devices (monitors, printers, cameras, scanners)
- With the help of this graphic it is possible to create almost
any pattern, regardless of complexity (in vector graphics this is far from
always)
- High speed image processing
Disadvantages:
- Impossibility of perfect scaling
- Large file size with simple images
- The impossibility of printing on a plotter
Formats
When storing raster images, compression is used. It can be
with losses and without them. It depends on whether it can be restored
without loss or not. Additional information can also be stored in a graphic
file: about the author of the file, the camera and its settings, the number of
dots per inch during printing, etc.
Lossy compression
When used, discards some of the information (less perceived by the
eye).
- JPEG is a widely used image format. During compression, the colors of the neighboring pixels are averaged and the high-frequency components in the spatial spectrum of the image fragment are discarded. Upon a detailed examination, the blurring of borders and the characteristic moire near them becomes noticeable.
Lossless compression
The algorithm is used to reduce redundant
information.
- PNG
- PCX allows you to compress simple images well.
- GIF outdated format supporting no more than 256
colors at the same time
- BMP is usually used without compression



