• Graphics expansion. Vector formats

    Today we will talk about image formats, their features and distinctive features. Many of us know that images come in different formats, but not everyone understands why there are so many of them and what their distinctive features are.

    Any image stored on a computer has its own graphic format. Each of the graphic formats has its own properties and purpose. Today there are a huge number of graphic formats. We will consider most of the graphic formats based on one of the most popular graphic editors Adobe Photoshop. Why Photoshop, it’s simple, this one graphic editor has the most a large number formats.

    But in addition, we will try to analyze other widely known image formats.

    So let's get started:

    PSD- This is a proprietary format of the Adobe Photoshop program, it allows you to save all the work done on the image. Namely, transparency, layer blending modes, shadows, layers, layer masks and all the other little things done with the image. This format is usually used if the image is not completely finished. It is also often used to develop a website layout, since layout is done with of this file conveniently seeing all layers and elements. And in all other cases there is no point in using it, since it has a significantly large file size compared to other formats.

    TIFF– allows you to save the prepared Photoshop project as accurately as possible. It contains not only pixel information, but also the density of dots per image when printed in dpi. It can also store several image layers plus channel transparency information. This format was used mainly in printing.

    BMP- This is a dot pattern. An image in this format consists of a mass of dots, each of which contains its own color. This format is very large and can be easily compressed by archivers. The quality loss in BMP is not significant, however, it is inferior to TIFF.

    JPEG is the most widely used format. It is widely used in digital technology (cameras). The reason for such widespread use is its rather good quality and small file size. But the small size means that image quality is significantly lost. It's all about the image compression algorithm; it consists in the fact that, when compressed, the image significantly loses accuracy. For these reasons, it is not advisable to use this format in printing. But the advantage is that it is convenient to send them by email ( email), post it on the Internet and store it on disk.

    GIF– Primarily used to produce graphics for the Internet. It is not suitable for saving photographs, as it has a limitation in color reproduction; for the same reasons, it is not suitable for printing. The image of this graphic format consists of dots, which can include from 2 to 256 colors. Limited color rendering and support for transparency make it indispensable for storing images with minimal colors, such as logos. Another feature of the format is the ability to produce animated images. Widely used to create GIF (animated) banners.

    EPS– can be called the most reliable and universal format. It is mainly intended for transmission to publishing houses; the format can be created and used by almost all graphic editors. Use this format makes most sense only if the output is on a PostScript device.

    This format is unique; it supports everything necessary for printing, it can record data in RGB, clipping paths, as well as the use of fonts and more. Initially, EPS was developed as a vector format, but later its raster version appeared - Photoshop EPS.

    PNG is a graphic format that recently replaced the Gif format, and has already become very popular due to the fact that it can maintain transparency and translucency, which was not possible in its predecessor GIF. This means that the png maintains translucency in the range from 1 to 99% using an alpha channel with 256 levels of gray. Transparency works as follows: gamma correction information is written to the file. Gamma correction is a certain number of brightness, contrast of the monitor. This number is subsequently read from the file and allows you to adjust the image display by adjusting the brightness.

    PICT is a proprietary Macintosh format. The format is capable of including both raster and vector information, text, as well as sound, and uses RLE compression. Bitwise PICT images can have absolutely any bit depth. Vector PICT images, which have virtually disappeared from use these days, had unusual problems line thickness and other deviations during printing.

    The format is used for Macintosh, and when creating certain presentations only for Mac. On regular computers(not Mac) PICT - the format is presented with the extension .pic or .pct, read by certain programs, working with this format is often not easy.

    PDF– the format was proposed and developed by Adobe as a format for electronic documentation, various presentations and layout for sending it by e-mail. And its design feature was to provide a compact format. For these reasons, all data in pdf can be compressed, and the peculiarity of it is that different types of compression are applied to different types of information, more suitable for these types of data: JPEG, RLE, CCITT, ZIP.

    PCX– raster image format. pcx files use a standard color palette, this format has been extended to store 24-bit images. This format is hardware dependent. Designed to store information in a file in the same form as in the video card. To combine this format with older programs, support for the EGA mode of the video controller is required. The compression algorithm is fast and takes up a small amount of memory, but is not very efficient and is not suitable for compressing photographs and detailed computer graphics.

    ICO– This format is designed for storing file icons. Ico files can be any size, but the most commonly used icons are those with sides of 16, 32 and 48 pixels. Icons with sizes of 24, 40, 60, 72, 92, 108, 128, 256 pixels are also used. Icon data is usually not compressed. Icons come in True Color, High Color, or with a clearly fixed palette. In their structure, ICO files are closest to the BMP format, but differ from bmp in the presence of a mask applied to the background using the bitwise “AND” operation, which makes it possible to implement transparency.

    Exclusive OR overlaying the main image can even invert pixels where the background was not masked. And already with Windows XP, 32-bit icons began to be supported - each pixel corresponds to 24-bit color plus an 8-bit alpha channel, which allows for partial transparency of 256 levels. Using the alpha channel, it is also possible to display an icon with smooth edges and also with a shadow, combined with different backgrounds, the icon mask is ignored in this case.

    CDR is a vector format image or drawing created using CorelDRAW. This format was developed by Corel for use in the company's own software products. CDR images are not supported by many graphics editors. But this is not a problem, the file can be easily exported using the same CorelDRAW to more common image formats. Images created in CorelDRAW with the CDR extension can also be opened in Corel Paint Shop Pro. For best compatibility, Corel recommends saving files in an earlier version of CorelDRAW CDR format. CDR files tenth and earlier versions, can be opened using the program Adobe Illustrator.

    A.I. is a vector image format, the name of which comes from the abbreviation of the name of the vector editor AdobeIllustrator. Supported by almost everyone graphic programs that are in any way related to vector graphics. Ai is one of the best middlemen for transferring an image from one editor to another. A distinctive and very important feature of the format is its greatest stability and compatibility with PostScript, which is of great value for publishing houses of printing products.

    RAW– this is a data format containing raw information (or processed to a minimal extent), created directly by incoming information from the matrix of a camera (video camera, etc.). This format denotes not only photo data, but also the original audio or video data. This format stores all information about the file and has greater potential for processing photographs than JPG format. RAW preserves the highest possible quality. Data in RAW files can be uncompressed, losslessly compressed, or lossily compressed.

    RAW files from a number of camera manufacturers have their own extension format, such as Canon - CR2, Nikon - NEF. Many others have the DNG format offered by Adobe, these are companies such as Leica, Hasselblad, Samsung, Pentax, Ricoh. If it is not available in Photoshop raw camera for your camera, the files will not open; it was created for these purposes by Adobe.

    SVG– Scalable Vector Graphics format. The format was created by W3C. According to the specification, it is designed to describe two-dimensional vector and mixed vector/raster graphics in XML. Includes three types of objects: shapes, images, and text. Supports still, animated and interactive graphics. You can create and edit as in text editors by editing the code, or in any graphic editor for vector graphics (Adobe Illustrator, Inkscape, CorelDRAW, Corel SVG Viewer). SVG is an open standard and is not proprietary.

    Of the advantages SVG format can be highlighted. Scalability without loss of image quality. Text in SVG is text, not an image, so it can be selected, copied, and indexed by search engines (when used on a website). The interactivity of the graphics makes it possible to attach your own events to each element. Availability of using raster graphics within a document. Animation that is implemented in SVG using the SMIL language. Compatible with CSS, it allows you to set object properties such as color, background, transparency, etc. SVG easily integrates with HTML and XHTML documents. Reducing quantity HTTP requests. Small file weight compared to raster graphics.

    The abundance of images used on computers can be divided into three large groups. First of all, 2D graphics, in which flat (without a third coordinate) images are created; this group includes raster and vector graphics. Then 3D graphics and motion graphics.

    Since images are created using special tools - graphic editors - it is impossible to consider file formats without taking into account their features. First of all, what is graphic file? In the most general case, this is the system of image information adopted in a given graphics editor and the method of saving (recording) it. Such an information system may contain both general data (representation of an image on a particular display device, size, resolution, type of printer for printing, degree and method of information compression), and data that is specific and unique. Such data is created during the image editing stage and is intended for subsequent use during editing. For example, CorelDraw files contain information about curves, Photoshop files- information about layers, channels, etc. Each graphic editor encodes this information in a certain way when recording (saving) on ​​a medium. Thus, the graphic file format should be understood as a set of information about the image and the method of recording it in the file. In general, everything graphic formats can be divided into two groups. Formats general purpose contain only the image itself and are intended for storing, transferring or viewing images (gif, tiff, jpeg, etc.) and specific formats intended for storing intermediate results of image editing (cdr, cpt, psd, ai, etc.).

    Let us dwell in more detail on the 2D group due to its greatest prevalence. A raster graphics image is an ordered array of unit elements (pixels for a monitor or dots for a printer) containing color information. The number of such elements is determined by the image size and resolution, and the file size additionally depends on the color palette used (black and white or 1-bit, grayscale and 256 colors or 8-bit, high color or 16-bit, true color or 24-bit ). Vector graphics contain mathematical descriptions of the curves and fills (areas filled with a single color and areas of gradients) that make up an image. The issue of resolution and color palette is decided immediately before the file is output to a specific physical device and taking into account its characteristics. In the printing industry, this process is known as RIP - rasterizing an image process.

    File compression. Since graphic files tend to be large, the ability to compress (pack) information is useful. There are currently two known compression methods - lossless and lossy. Lossless compression algorithms are similar to those of conventional archivers (LZH, PKZIP, ARJ). The most famous of them, LZW (LZ84), is widely used in the popular raster formats GIF and TIFF. Lossy compression algorithms discard information that is not perceptible to humans (JPEG, PCD). The degree of compression in this case is much higher, but occurs more slowly and can lead to deterioration in quality (depending on the selected compression ratio). The main disadvantage of this algorithm is the impossibility of recompression without significant loss of the original image quality. Therefore, save in JPEG format Only final editing results are recommended, and in no case intermediate ones.


    General purpose formats

    Microsoft Windows Bitmap (BMP)

    Format for storing raster graphics in Microsoft environment Windows (for example, screen wallpapers and screensavers). Supports 1-, 4-, 8-, 24-bit color. Allows compression without loss of quality.

    Kodak Photo CD (PCD).

    The developer is Kodak. The format is intended for storing slides and negatives captured using a Kodak Photo CD type camera. Each file stores 5 copies of one image of different sizes and qualities from 192x192 to 3072x2048 pixels. It is impossible to programmatically record a PCD image on a computer; you can only import the image into a graphics editor that supports this format.

    Zsoft PC PaintBrush (PCX)

    One of the oldest and most famous formats for storing raster graphics. It appeared almost along with personal computers, due to which it is the most widespread and is supported by almost all image viewing/editing programs. Uses the simplest lossless compression algorithm RLE.

    Tag Image File Format (TIFF)

    Developers: Aldus and Microsoft. A universal format for storing raster graphics, widely used in publishing. It is necessary to make a reservation that there are quite a lot of its varieties, due to different compression algorithms. The format that uses the LZW algorithm has the greatest compatibility. The format supports 24 and 32-bit color (CMYK), two types of recording IBM PC and Macintosh, and can store information about masks (selected areas of the image).

    TrueVision TGA (TGA)

    Developed by TrueVision. The format is used for storing raster graphics and has an interesting feature - along with support for 24-bit color, it has another 8 bits for each single image element to store additional information. In particular, it may contain a mask, which is used in video editing programs, for example, to create an overlay of two sequences of frames. It has been known for a long time and is supported by many graphics packages.

    Graphics Interchange Format (GIF)

    Developed by CompuServe Corporation in 1987 for storing raster graphics. Implemented one of the most effective LZW compression methods for its time (87g). Allows you to display an image on the screen in four passes, allowing you to preview the image before it is finally drawn. In 1989, a new version of GIF 89a appeared. This format supports saving multiple images, animation sequences, and transparency colors in one file for the purpose of overlaying images on top of each other. Still widely used to store and transmit small images (page design elements) to the World Wide Web.

    Joint Photographic Experts Group (JPEG)

    The raster format owes its popularity to the high degree of compression of the source image, based on a lossy compression algorithm. However, this applies primarily to 24- and 8-bit images. There are several varieties, due to different compression algorithms and display methods (gradual rendering is similar to gif). Also widely used on the WWW, mainly for transmitting large images.


    Specific formats

    As mentioned above, this group of formats is intended mainly for “internal” use (storing intermediate results of image editing). In addition to information about the image itself, the files contain a lot of service data that cannot be correctly interpreted by other viewing/editing programs. Such data may include information about fonts, layers, selections (masks), curves, special effects, etc. The most common formats are for vector graphics - cdr (Corel Draw) and ai (Adobe Illustrator), for raster graphics - psd (Adobe Photoshop ) and cpt (Corel PhotoPaint). Typically, the final image (ie the image intended for publication) is imported into one of the general purpose formats depending on the purpose of publication (gif or jpeg for the Internet, tiff for publishing systems, etc.).

    Igor SIVAKOV

    Basic graphic file formats. Brief overview

    BMP(Windows Device Independent Bitmap)

    Native Windows format. It is supported by all graphic editors running this operating system. It is used to store bitmap images intended for use in Windows and this is where its scope ends. Using BMP for purposes other than Windows is a fairly common mistake.

    GIF(CompuServe Graphics Interchange Format)

    The hardware-independent GIF format was developed in 1987 (GlF87a) by CompuServe for transmitting raster images over networks. In 1989, the format was modified (GIF89a), and support for transparency and animation was added. GIF uses LZW compression, which makes it possible to compress files with a lot of uniform fills (logos, inscriptions, diagrams) well.

    JPEG(Joint Photographic Experts Group)

    Strictly speaking, JPEG is not a format, but a compression algorithm based not on searching for identical elements, but on the difference between pixels. The higher the compression level, the more data is discarded, the lower the quality. Using JPEG you can get a file 1,500 times smaller than BMP! Initially, the format specifications did not include CMYK, Adobe added support for color separation, but CMYK JPEG in many programs makes it easier to compress photographic-quality raster images than logos or diagrams.

    TIFF, TIF(Target Image File Format)

    The hardware-independent TIFF format is one of the most widespread and reliable today; it is supported by almost all programs on PC and Macintosh that are somehow related to graphics. The entire range of color models is available to him from monochrome to RGB, CMYK and additional Pine colors. TIFF may contain clipping paths, alpha channels, layers, and other additional data. In the TIFF format, it is possible to save using several types of compression: JPEG, ZIP, but, as a rule, only LZW compression is used.

    EPS(Encapsulated PostScript)

    The format uses a simplified version of PostScript: it cannot contain more than one page in one file, and does not save a number of printer settings. EPS is designed for transferring vectors and rasters to publishing systems and is created by almost all programs that work with graphics. It makes sense to use it only when the output is carried out on a PostScript device. EPS supports all color models needed for printing. EPS has many varieties, depending on the creator's program. The most reliable EPS are created by programs produced by Adobe Systems: Photoshop, Illustrator, InDesign.

    QXD(QuarkXPress Document)

    Working format famous program QuarkXPress layouts. The package is characterized by stability, speed and ease of use. The main, never defeated competitor of Adobe Systems continues to exist now in its fifth reincarnation. It should also be noted that there are still two in use previous versions QuarkXPress 3.x and QuarkXPress 4.x. The special ideology of the package lies in its ability to adapt to any layout designer’s tasks. After all, the main functions are performed by special extensions (Xtensions), of which there are more than Plug-ins for Photoshop.

    RM(Page Maker)

    Adobe Systems layout program format. An extremely simple package in terms of capabilities. It was intended primarily for the transition from manual layout to computer layout with minimal costs for staff training. It became widespread in our country thanks to timely Russification and, again, ease of learning for beginners. Currently, development of the package has been stopped.

    ID(InDesign)

    Code name “Quark Killer” A follower of RM, designed to squeeze out competitors in the publishing market, primarily Quark. A hodgepodge of solutions borrowed from other layout packages did not lead to the expected result. ID is an extremely clumsy and inconvenient package, which turned out to be the killer only of its progenitor RM, and then because of the cessation of development of the latter. The only advantages include a built-in PostScript interpreter and apparent ultra-compatibility with other Adobe products.

    PDF(Portable Document Format)

    Proposed by Adobe as a platform-independent format for creating electronic documentation, presentations, transferring layout and graphics over networks. PDF files are created by converting from PostScript files or the export function of a number of programs. The format was originally designed as a means of storing electronic documentation. Therefore, all data in it can be compressed, and in different ways: JPEG, RLE, CCITT, ZIP. PDF can also retain all of the output device information that was in the original PostScript file.

    APS(Adobe PostScript, page description language)

    It was created in the 80s to implement the WYSIWYG (What You See is What You Get) principle. Files in this format are actually a program with commands to execute for the output device. Such files contain the document itself, related files, fonts used, as well as other information: color separation boards, additional fees, screen lineature and halftone dot shape for each board and other data for the output device. Data in a PostScript file is usually written in binary encoding. Binary code takes up half the space of ASCII.

    CDR(format of the popular vector editor CorelDraw)

    The package gained its popularity and distribution due to its apparent ease of use and interactive special effects (lenses, transparencies, non-standard gradients, etc.). The wide capabilities of this program in terms of effects are explained by the richer internal page description language than that of Adobe products that use PostScript. This is precisely the main disadvantage of CorelDraw. PostScript with Korelov special effects is often a headache for printing houses and prepress bureaus.

    CCX(vector graphics format from Corel)

    It is not supported by anything other than Corel Draw. Not suitable for printing and the Internet. The advantages include only a small volume of files saved in this format and the presence of many excellent cliparts.

    Magazine " Computer practice. Manual for professionals” No. 1

    P.S. Of course, the log forgot about such common files as:

    PNG(Portable Network Graphics) - raster storage format graphic information, which uses lossless compression. PNG was created to both improve and replace GIF format graphic format that does not require a license for use.

    ICO(Windows icon) - a format for storing file icons in Microsoft Windows, similar to the CUR (Windows cursors) format.

    A.I.(Adobe Illustrator) is a vector graphics editor developed and distributed by Adobe Systems.

    DjVu(French déjà vu - “already seen”) is a lossy image compression technology and format designed specifically for storing scanned documents.

    As is known, depending on the method of forming an image on a monitor screen, computer graphics are usually classified into several types:

    • raster
    • vector
    • fractal
    • three-dimensional

    I think the reader already knows all this. Therefore, today we will consider the most common and popular raster graphics formats. In future publications, I plan to describe file formats for other types of computer graphics, in particular vector ones. Having described these formats, I will give my recommendations for them. practical use in everyday life, i.e. what format for what and where to use

    Basics of raster graphics

    Raster graphics is a graphic represented on a computer as a set of dots (pixels). Each pixel contains color information. The pixel size is very small, so the human eye perceives the entire image without dividing it into pixels.

    For raster graphics important characteristic is the resolution of the image. The same picture can be presented with the best and worst quality in accordance with the number of points (pixels) per unit length.

    Permission— number of points per unit of measurement.

    dpi (dots per inch)— number of dots per inch.

    ppi (points/pixels per inch)- pixels per inch.

    Pixel— raster point of the screen image. All images are divided into dots. Pixel is the smallest point. The image can no longer be divided. In addition, a pixel is a dot of one color; it is impossible to color half a pixel one color and the other half another.

    Don't confuse image resolution, monitor resolution, and printer resolution. These are different things.

    Having remembered the basics of raster graphics, let's move on to a description of raster graphics storage formats.

    Image storage formats in raster graphics

    File Format- a method of preserving the electronic parts that make up computer file. Various formats organize saving files in different ways. Consider everything existing formats I won’t do raster graphics (and I couldn’t), we’ll consider only the most common and popular ones.

    BMP(Bit Map - bit carat). This format initially used the simplest encoding - pixel by pixel (the most wasteful), which was done sequentially line by line, starting from the lower left corner of the graphic image. Files of this format were included in the first versions Windows. This format used only 256 colors, i.e. a pixel is represented by only one byte. Later, the format began to be used to save full-color images. Format BMP- one for standard raster graphics formats.

    TIFF (Taged Image File Format)- a standard format in topographic graphics and publishing systems. TIFF files provide better print quality. Because of large size, this format is not used when creating Web sites and publishing on the Internet.

    Format TIFF is one of the most universal and widespread raster graphics formats. It was created as a cross-platform universal format for color images. Working with it is supported by almost all programs for working with bitmap graphics. Can store graphics in monochrome, in RGB And CMYK color representations.

    The format includes internal compression. It has an open architecture - it is possible to declare information about the type of image in the header, i.e. versions of it can be used in the future to present new developments. Accompanying information of transmitted images (signatures, etc.) is also saved in the format. Image format TIFF are stored in files with the extension .tif.

    GIF format (Graphic Interchamge Format)- a graphics data exchange format that is used for recording and storing raster graphics. This format differs from other raster graphics formats in that it for a long time supported online. Uses indexed colors (limited set of colors). This is one of the most common image formats distributed on the Internet and used to create Web sites.

    Images in GIF .gif. To the benefits GIF The important thing about images is that the appearance of the image is independent of the browser and platform. Drawings, drawings and images with a small amount of solid color, transparent images and animation sequences (this is a very well-known feature of this graphics format) are displayed best. IN GIF Images are compressed without losing information.

    JPEG format (Joint Photographic Expert Group)— designed for storing compressed images. The image compression method it uses was developed by a team of photography experts. The decoding of the abbreviation immediately becomes clear JPEG— a joint group of experts in photo processing.

    JPEG is one of the most powerful image compression algorithms. In practice, it is the de facto standard for storing full-color images. Format JPEG was created in order to get rid of the restrictions that were imposed on images created in GIF format.

    The algorithm operates on areas of 8? 8, in which the brightness and color changes relatively smoothly. Compression in JPEG carried out by smoothly changing colors in the image. A high compression ratio is provided, the value of which reaches 100 and depends on the permissible level of loss of visual information.

    The format is widely used in documents HTML and for data transmission over the network. Saves graphics settings in color representation RGB(usually). Images in JPEG format are stored in files with the extension .jpg.

    Programs that work with JPEG, use lossy compression algorithms, they exclude from the image those data that are considered unimportant. Before applying the compression algorithm, the image is divided into rectangular areas. When compressing, there is a risk of getting a fuzzy, blurry image with distortion of details.

    JPEG 2000 format (jp2)

    This format was developed to replace JPEG. When saving images with the same compression level, images saved in JPEG 2000, are sharper and take up less disk space. In addition, this format solves the problem with the appearance of defects JPEG, which appeared when saving with a high compression ratio (a lattice of 8 × 8 pixel blocks).

    The format is not supported in all browsers, which greatly hinders the spread of this format.

    PNG (portable network graphics)- a raster graphics storage format that uses lossless compression. PNG is a free format (unlike GIF), so it is widely used.

    It is a very powerful and widely used format on the Internet and other areas of computer graphics.

    WMF format

    WMF format (Windows Metafile Format)- used to exchange graphic data between OS applications Microsoft Windows. IN WMF files can store both vector and raster images. Images in WMF format are stored in files with the extension .wmf.

    PSD and CDR formats

    PSD format (PhotoShop Document)— internal format for the package Adobe Photoshop. Allows you to save layers in an image and supports all types of graphics. Images in PSD format are stored in files with the extension .psd.

    CDR format— internal format for the company’s software package CorelDRAW. Images and text prepared in the program CorelDRAW V CDR format, stored in files with the extension .cdr.

    Recommendations for using different raster graphics formats

    Now I will try to move from theory to practice and consider the areas of application of various raster graphics formats depending on their characteristics. The characteristics of the formats are as follows: type of compression used, support transparent colors, the ability to create simple animations, support for line-by-line image output for gradual loading in the browser, and the number of colors used in the image.

    Using GIFs

    Format characteristics:

    • Compression support: lossless (Lempel-Ziv-Welch, LZW)
    • Transparency support: Yes
    • Animation support: Yes ( distinctive feature of this format)
    • Yes (interlaced)
    • Number of colors: indexed colors (256 colors)
    • all platforms

    Recommendations: it is advisable to use this format in Web, for images without smooth color transitions (logos, banners, inscriptions, diagrams). Nice guy compression and a small number of supported colors allow you to save space when storing graphics, and can also be used when creating websites for more fast loading HTML-pages. Interlaced scanning makes it possible to see and evaluate the downloaded image without waiting for the download to complete. However, the limited range of colors makes this format unsuitable for storing images with smooth transitions, gradients, etc. Mainly used on the Internet.

    Using PNG

    Format characteristics:

    • Compression support: lossless compression (Deflate)
    • Transparency support: Yes
    • Animation support: Yes(APNG)
    • Interlaced display support: Yes (two-dimensional interlacing)
    • Number of colors: Deep Color
    • Compatibility with other platforms: all platforms

    Recommendations: the most advanced compression algorithm in PNG allows you to save files smaller in size than in GIF. The ability to use absolutely any color and the use of transparency make this format a leader in terms of use in Web. I would recommend using it instead GIF. Scope of application - used in design Web-sites, image editing, etc. This is a universal format with a great future.

    Using JPEG

    Format characteristics:

    • Compression support: lossy compression
    • Transparency support: absent
    • Animation support: absent
    • Interlaced display support: Yes (Progressive JPEG)
    • Number of colors: True Color (RGB and CMYK models)
    • Compatibility with other platforms: all platforms

    Recommendations: This format should be used to store a large number of images (photos) on your hard drive, which will significantly save its working space (thanks to its excellent compression type). It needs to store large-sized photographs with a large number of smooth transitions. Small size final files, allows you to effectively use JPEG for publishing photos on the Internet. But you should not save the same images in JPEG several times - this will lead to defects and “damage” the image.

    Using TIFF

    Format characteristics:

    • Compression support: supports the ability to apply different compression algorithms (depending on the image being saved)
    • Transparency support: absent
    • Animation support: absent
    • Interlaced display support: absent
    • Number of colors: 8, 16, 32 and 64 bpc (Lab, RGB and CMYK models)
    • Compatibility with other platforms: all platforms

    Recommendations: this powerful format is used in printing, publishing systems, etc. Files in this format are stored for future printing. TIFF Used to store scanned images, faxes, etc. illustrations.

    Using BMP

    Format characteristics:

    • Compression support: It is possible to use lossless compression (Run Length Encoding, RLE)
    • Transparency support: absent
    • Animation support: absent
    • Interlaced display support: absent
    • Number of colors: RGB model, color depth 24 bits
    • Compatibility with other platforms: Windows only

    Recommendations: This format is not suitable for use in Web, typography and even for storing images (due to the lack of image compression). Used only because it is "embedded" in the OS Windows default.

    Conclusion

    I hope this article helped you understand a little about the variety of raster graphics formats. My recommendations will help you decide on the choice of format for storing graphics. In short, in JPEG store photos in GIF- banners and logos (but it is advisable to gradually move on to PNG), A TIFF used to prepare documents for printing.

    The BMP (Bitmap – pixel map) format was developed by Microsoft and is used in Windows to represent raster graphics. Allows you to store color data in the values ​​of the RGB color model (up to 16 million shades) or in a color table (up to 256 shades). This format uses RLE compression. The use of this format is not advisable on the WWW or in printing (this is due to the fact that this format was developed specifically for Windows).

    JPEG (Joint Photographic Experts Group). Strictly speaking, JPEG is not a format, but a compression algorithm based not on searching for identical elements, as in RLE and LZW, but on the difference between pixels. Data encoding occurs in several stages.

    1. Sampling. Pixel data is converted from RGB color space to YCbCr color space (Y specifies the brightness of an image point, Cb and Cr define chromaticity. The first component specifies blueness, the second specifies redness. Called the television model (compatibility of color images with black and white)). The image is divided into 8x8 pixel blocks.

    2. Discrete cosine transform. For each block, a set of numbers is formed. The first few numbers represent the color of the block as a whole, while subsequent numbers reflect the subtle renderings. The range of details is based on human visual perception, so large details are more noticeable.

    3. Quantization. Coefficients of the discrete cosine transform that are not essential for restoring an image close to the original are discarded. At this stage, depending on the chosen quality level, a certain part of the numbers representing fine details is discarded. It is at this stage that data is lost in the JPEG compression method.

    4. The last step is coding Huffman method for more efficient compression of the final data.

    Data recovery occurs in reverse order.

    Thus, the higher the compression level, the more data is discarded, the lower the quality. Using JPEG you can get a file 1-500 times smaller than BMP! The format is hardware independent, fully supported on PC and Macintosh, but it is relatively new and is not understood by older programs (before 1995). JPEG does not support indexed color palettes.

    From the above, the following conclusions can be drawn.

    1. JPEG compresses photographic-quality raster images better than logos or diagrams - there are more halftone transitions in photographs, and unwanted interference appears among monochromatic fills.

    2. Large images for the web or with high printed resolution (200-300 or more dpi) are compressed better and with less loss than with low resolution (72-150 dpi), because in each 8x8 pixel square, the transitions are softer, due to the fact that there are more of them (squares) in such files.

    3. It is undesirable to save any images with JPEG compression where all the nuances of color rendering are important, since color information is discarded during compression.

    4. Only the final version of the work should be saved in JPEG, because each new save leads to new losses (discarding) of data and turning the original image into “mush”.

    GIF (CompuServe Graphics Interchange Format)

    The hardware-independent GIF format was developed in 1987 (GIF87a) by CompuServe for transmitting raster images over networks. In 1989, the format was modified (GIF89a), support for transparency and animation was added. GIF uses LZW compression, which makes it possible to compress files with a lot of uniform fills (logos, inscriptions, diagrams) well.

    GIF allows interlaced image recording (Interlaced), thanks to which, having only part of the file, you can see the entire image, but with a lower resolution. This is achieved by writing and then loading, first 1, 5, 10, etc. lines of pixels and stretching the data between them, the second pass is followed by 2, 6, 11 lines, the image resolution in the Internet browser increases. Thus, long before the file is downloaded, the user can understand what is inside and decide whether to wait until the entire file is downloaded. Interlaced notation slightly increases the file size, but this is usually justified by the acquired property.

    In GIF you can set one or more colors to be transparent; they will become invisible in Internet browsers and some other programs. Transparency is provided by an additional Alpha channel saved with the file. ( Alpha channel : Additional picture channel. It carries certain information about the selected area.) In addition, a GIF file can contain not one, but several raster images, which browsers can load one after another with the frequency specified in the file. This is how the illusion of movement is achieved (GIF animation).

    The main limitation of the GIF format is that the colors are stored in a table. The number of colors in an image can be from 2 to 256, but these can be any colors from the 24-bit palette.

    Scope of application. Text, logos, hard-edged illustrations, animated graphics, images with transparent areas, banners. However, the GIF format is slowly but surely disappearing from the scene, and the impetus for this was the demands for payment of monetary compensation to the American company Unisys, which owns the patent for the LZW data compression algorithm that underlies this format. Today, its most likely successor is the PNG format.

    PNG (Portable Network Graphics)

    PNG is a relatively recently developed format for the Web, designed to replace the outdated GIF. Uses Deflate lossless compression, similar to LZW (it was because of the patenting of the LZW algorithm in 1995 that PNG arose).

    This format, which compresses graphic information without loss of quality using the Deflate algorithm, unlike GIF or TIFF, compresses raster images not only horizontally, but also vertically, which provides a higher compression ratio and supports color photographic images up to 48-bit inclusive . PNG format allows you to create images with 256 levels of transparency. Other distinctive features of this format include two-dimensional interlaced scanning (i.e., the image appears gradually not only in rows, but also in columns).

    Flaws

    1. As a disadvantage of the format, it is often mentioned that it does not allow creating animated videos, although now, with the general transition of almost all animation to Flash technology, this is no longer relevant at all.

    2. This format is not suitable for storing images that cannot be printed.

    3. The PNG format is significantly inferior to its predecessor, GIF, when it comes to small design elements of web pages, such as buttons, frames, etc.

    TIFF (Tagged Image File Format)

    The hardware-independent TIFF format appeared as an internal format of the Aldus PhotoStyler program. Its modular architecture turned out to be so successful that, having successfully survived the death of its native program, TIFF continues to improve and develop today. Now TIFF is the most common format in printing. It is reliable because it is supported by almost all programs on PC and Macintosh in one way or another related to graphics. The ability to record images in TIFF format is one of the hallmarks of high-end modern digital cameras.

    The format supports a variety of compression algorithms (including the popular LZW, Deflate or JPEG), image types from bitmap (1-, 2-, 4-, 8-, 24- and 32-bit images) and indexed colors to LAB, CMYK and RGB (except duplex and multi-channel documents). In addition, there are two varieties of the format, respectively for IBM PC and Macintosh, due to the different order of recording numbers implemented on these platforms. With LZW compression, a TIFF file takes up almost the same amount of space as a GIF, only, unlike the latter, TIFF supports full-color images and stores detailed information about the image in its body - resolution, printer type and other details necessary for professional work with images . This format supports such purely professional features as clipping paths, alpha channels, the ability to save multiple copies of an image at different resolutions, and even include layers in the file. Due to its compatibility with most professional image processing software, the TIFF format is very convenient when transferring images between different types of computers (for example, from PC to Mac and vice versa).

    PSD (Adobe Photoshop)

    The PSD format is a standard format in Adobe Photoshop and differs from most conventional raster formats in its ability to store layers. It contains many additional variables (not inferior to TIFF in terms of their number) and compresses images using the RLE Packbits lossless compression algorithm, sometimes even stronger than PNG (only in cases where file sizes are measured not in kilobytes, but in tens or even hundreds of megabytes). The format supports color depths up to 16 bits per channel (48-bit color and 16-bit black and white), as well as alpha channels, layers, outlines, transparency, vector lettering, etc. Perfect for transfer or storage images containing specific elements unique to Adobe Photoshop. PSD files are easily readable by most popular viewers, but do not forget that by opening these files in some third-party graphic editors, even those that declare support for the PSD format, you can lose a significant part of their specific capabilities (especially in terms of working with layers.