• Graphic file formats. Computer Graphics Basics

    Depending on how well you understand graphic formats, the final result of all the work will directly depend. Understanding what format to save images and photos in is extremely important. Most likely, you have often thought and asked yourself in what format is it better to save images and photographs. In this tutorial we will look at main graphic file formats which photographers most often use, we’ll talk about the pros and cons of each of them and give valuable recommendations. Let's get started!

    JPEG (or JPG) (Joint Photographic Expert Group)

    Let's start the review with the most popular and generally accepted format today - JPEG or JPG. When you save an image in this format, some digital data is lost. This happens because JPG uses a specific compression algorithm. Why do people use it then? The answer is simple: because the JPG format preserves the colors that the human eye sees, while the file size is significantly smaller than others. Although a JPEG image is great for viewing on devices and on the Internet, remember that you should not save images in JPEG that are subject to further processing, as the quality will deteriorate with each new save. Today it is the most common graphic format.

    BMP (Bitmap Picture)

    The simplest BMP format was used in the first versions of Windows. In BMP, color data is stored in the RGB model and it can store both indexed colors (256 colors) and full-color images, and in the first case, the simplest RLE (Run Length Encoding) compression is possible. Without compression, the file size is close to the maximum possible. Today it is used for images intended for use in Windows. By the way, using BMP not for Windows needs is a common mistake of all beginners. Remember, BMP cannot be used for the web, for printing, or for simple transfer and storage of information.

    TIFF (Tagged Image File)

    TIFF was originally developed by the talented company Aldus for its PhotoStyler graphics editor. This format is very popular among photographers, but for a completely different reason than JPG. TIFF files can be saved in two different ways: either with little compression or no compression at all. In addition to photography, it is widely used in publishing systems that require the best quality images. A TIFF file stores complete information about each pixel of the photograph taken. TIFF files are used on both Macintosh and Windows platforms, and weigh many times more than JPG because they do not use compression.

    GIF (Graphics Interchange Format)

    This format was created by CompuServe back in 1987 and is even used on the Internet today along with JPG. Online The GIF format has some advantages over JPG. If you save the image as a GIF with 256 colors, the file size will be amazingly small and very different from the original. On the other hand, it is not the best technology for using this format in digital photography. It is best to save an image as a GIF if the image contains some text (for example, a logo, or a black and white image).

    RAW (raw file)

    Favorite format of a professional photographer. When using this format, the image data is left unprocessed, resulting in images with a lot of information, which significantly affects the file size. In a program (For example, Photoshop or LightRoom), a photographer can easily edit image parameters such as exposure time, filters, modes and many other parameters.

    Which format to use

    It depends on how you intend to use the images. Below are some recommendations that should help you.

    JPG

    Most digital cameras save images as JPG by default. As mentioned above, JPG is a pretty good compromise between image quality and file size. But you may not know that you can control the degree of compression of JPG images in your camera, and therefore their quality. Take a closer look at the camera settings; no doubt, you will find somewhere a means of adjusting the image quality. It can be located in the menu system or be a button on the camera body.

    Note that the concept of image quality is quite different from the concept of resolution. Permission - is the number of pixels that make up the image, and image quality is determined by the amount of color information that can be stored in each pixel, and this parameter can be used to determine what percentage of image quality is sacrificed.

    Most cameras have several image quality settings, such as high, medium and low. I recommend that you select the highest image quality for the JPG format, as setting the quality to low will result in completely unacceptable images. On the other hand, setting the highest image quality and resolution will use more.

    Lossless graphics files

    Many digital cameras can save files in another format - TIF. Remember that the TIF format, unlike JPG, is used when you need to ensure that the image is saved without losing data.

    It is best to use the TIF format if the photograph is being used specifically so that it can later be cropped, enlarged and printed. Indeed, for professional work, the TIF graphic format may be necessary, but even in such cases, the high resolution and quality of the JPG format may be sufficient. Remember, however, that the accuracy provided by the TIF format seriously affects the amount of memory required to store a single image. If you want to save a lot of pictures in TIF format, you should have the largest memory card you can afford.

    In general, I suggest that you forget about TIF for a digital camera. It's not worth any sacrifice, since JPG with the image quality and resolution set to maximum is more than enough in 99.9% of cases. In addition, it takes a long time to write a TIF file to a memory card.

    RAW

    There is another file format that you may encounter in some digital cameras. RAW format is much better than TIF. As noted above, it stores completely uncompressed photo data.

    A RAW file is like a digital negative - completely raw, unfiltered and untouched. Some professional photographers use RAW files because they give more creative options when processing an image. But not all digital cameras allow you to save photos in RAW.

    Many graphics editors are not capable of processing RAW files. In order to open such a RAW file, you need to install a special application on your computer, a plug-in for a graphics editor. However, companies supply cameras with special software that understands RAW.

    Digital images have a wide range of uses, which is why there are so many file formats. Below are some tips for choosing a file format that you might find useful:

    • If you want to post an image online, then JPG is the best choice. But GIF files are good because they are convenient to place in text, due to the transparent background.
    • If you are going to print photos in a large size, such as 20x30 cm or more, then the most suitable formats are TIF and JPG.
    • For slideshows and most similar projects, JPG is ideal.
    • For professional work and flexibility in photography settings, use RAW

    Knowledge of file formats and their capabilities is one of the key factors in pre-press preparation of publications, preparation of images for the web and in computer graphics in general.

    Yes, today there is no such kaleidoscope of extensions as in the early 90s, when each image editor company considered it its duty to create its own file type, or even more than one, but this does not mean that “everything needs to be saved in TIFF, but compress with JPEG".

    Each of the formats established today has undergone natural selection and has proven its viability and necessity. They all have some characteristic features and capabilities that make them indispensable in their work.

    Knowledge of the features and subtleties of technology is important for a modern designer, just as it is necessary for an artist to understand the differences in the chemical composition of paints, the properties of soils, types of metals and types of wood.

    The main purpose of Knowledge, by and large, is to expand a person’s capabilities, to increase the degree of his freedom, when a person acts as he sees fit, and not as his circumstances force him to do.

    Formats:

    GIF | JPEG | PNG | TIFF | PostScript | EPS | PDF | Scitex CT | Adobe Photoshop Document | Adobe Illustrator Document | Macromedia FreeHand Document | CorelDRAW Document | PICT |WMF | BMP | RTF

    Compression methods:

    LZW | JPEG | Huffman | CCITT | RLE (Run Length)

    All graphic data in a computer can be divided into two large branches: raster and vector. Vectors are a mathematical description of objects relative to the origin. Simply put, for the computer to draw a straight line, the coordinates of two points are needed, which are connected along the shortest path, the radius is specified for the arc, etc.

    Thus, a vector illustration is a set of geometric primitives. Most vector formats can also contain raster objects embedded in the file or a link to a raster file (OPI technology).

    The difficulty in transferring data from one vector format to another lies in the use of different algorithms and different mathematics by programs when constructing vector and describing raster objects.

    OPI (Open Prepress Interface) is a technology developed by Aldus that allows you to import not original files, but their images, creating in the program only a low-resolution copy (sketch) and a link to the original. During the printing process, the sketches are replaced with the original files. Using OPI, instead of simple embedding, makes it possible to save computer resources (primarily memory), significantly increasing its performance. OPI is the primary tool for working with imported graphics files in programs such as FreeHand and QuarkXPress, and is widely used in other products.

    A raster file is simpler (to understand, at least). It is a rectangular matrix (bitmap), divided into small squares - pixels (pixel - picture element). Raster files can be divided into two types: those intended for display and for printing.

    The resolution of files in such formats as GIF, JPEG, BMP depends on the computer's video system. In old Macs, there were 72 pixels per square inch of screen (screen resolution); on Windows, there was no single standard, but today the most commonly used value is 96 pixels per square inch of screen. In reality, however, these parameters have now become quite arbitrary, since almost all video systems of modern computers allow you to change the number of pixels displayed on the screen.

    Raster formats intended exclusively for display have screen resolution only, meaning one pixel in the file corresponds to one screen pixel. They are also printed in screen resolution.

    Raster files intended for pre-press preparation of publications have, like most vector formats, the Print Size parameter - the printed size. Associated with it is the concept of print resolution, which is the ratio of the number of pixels per square inch of a page (ppi, pixels per inch or dpi - dots per inch - the term is not entirely correct, but is often used).

    Print resolution can be from 130 dpi (for a newspaper) to 300 (high-quality printing), almost never needed anymore.

    Raster formats also differ from each other in their ability to carry additional information: various color models, vectors, Alpha channels or spot color channels, layers of various types, leading (interlaced loading), animation, compression capabilities and more.

    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.

    The LZW (Lempel-Ziv-Welch) compression method was developed in 1978 by the Israelis Lempel and Ziv and later refined in the USA. Compresses data by searching for identical sequences (called phrases) throughout the file. The identified sequences are stored in a table and are assigned shorter markers (keys). So, if there are patterns of pink, orange, and green pixels in an image that repeat 50 times, LZW detects this, assigns a separate number to that set (for example, 7), and then stores that data 50 times as the number 7. The LZW method also , like RLE, performs better in areas of uniform, noise-free colors, it performs much better than RLE at compressing arbitrary graphics data, but the encoding and decompressing process is slower.

    GIF allows you to record an image “through a line” (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. 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 a color image can only be recorded in 256 colors or less.

    Read also:

    • D. Kirsanov "Inexhaustible GIF"
    • A. Lebedev "The simple secret of GIF"
    • A. Lebedev "The complex secret of GIF"

    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. First, the graphics data is converted to a LAB color space, then half or three-quarters of the color information is discarded (depending on the implementation of the algorithm). Next, blocks of 8x8 pixels are analyzed.

    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.

    In the next step, depending on the quality level you choose, a certain portion of the numbers representing fine details are discarded. The final step uses Huffman coding to more efficiently compress 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. Initially, CMYK was not included in the format specifications; Adobe added support for color separation, but CMYK JPEG causes problems in many programs. The best solution is to use JPEG compression in Photoshop EPS files, which is described below.

    There are JPEG subformats. Baseline Optimized - files are slightly better compressed, but are not readable by some programs. JPEG Baseline Optimized is designed specifically for the web and all major browsers support it. Progressive JPEG is also designed specifically for the Web, its files are smaller than standard ones, but slightly larger than Baseline Optimized. The main feature of Progressive JPEG is its support for analogue interlaced output.

    From the above, the following conclusions can be drawn. JPEG compresses photographic-quality raster images better than logos or diagrams - they have more halftone transitions, and unwanted interference appears among monochromatic fills. 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. It is undesirable to save any images with JPEG compression where all the nuances of color rendering (reproduction) are important, since color information is discarded during compression. Only the final version of the work should be saved in JPEG, because each resaving leads to more and more data losses (discarding) and turning the original image into a mess.

    The LAB color space represents color in three channels: one channel dedicated to luminance values ​​(L - Lightnes) and the other two for color information (A and B). Color channels correspond to a scale, not to any one color. Channel A represents a continuous spectrum from green to red, while channel B represents a continuous spectrum from blue to yellow. The average values ​​for A and B correspond to real shades of gray.

    There is a similar YCC color model used in Kodak Photo CD and FlashPix formats not covered here.

    The Huffman compression method was developed in 1952 and is used as a component in a number of other compression schemes, such as LZW, Deflation, JPEG. The Huffman method takes a set of symbols and analyzes them to determine the frequency of each symbol. The most frequently occurring characters are then represented in the smallest possible number of bits. For example, the letter "e" is most often found in English texts. Using Huffman encoding you can represent "e" with just two bits (1 and 0), instead of the eight bits needed to represent the letter "e" in ASCII.

    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). Compressed indexed PNG files are usually smaller than similar GIF files, and PNG RGB is smaller than the corresponding TIFF file.

    PNG files can have any color depth, up to 48 bits. Two-dimensional interlacing is used (not only rows, but also columns), which, just like in GIF, slightly increases the file size. Unlike GIF, where transparency is like honey - either it is there or not, PNG also supports translucent pixels due to the Alpha channel with 256 shades of gray.

    The PNG file records gamma correction information. Gamma is a certain number that characterizes the dependence of the brightness of your monitor screen on the voltage on the electrodes of the kinescope. This number, read from the file, allows you to enter a brightness correction when displaying. It is needed so that the picture created on Mac looks the same on Windows and on various UNIXes. Thus, this feature helps to implement the main idea of ​​WWW - the same display of information regardless of the user's equipment.

    PNG is supported in Microsoft Internet Explorer version 4 on Windows and version 4.5 on Macintosh. Netscape added PNG support to its browser in versions starting with 4.0.4 for both platforms. However, support for important format features such as seamless transparency and gamma correction has not yet been implemented.

    Read also:
    M. Tiguleev "P&NG"

    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.

    Today it is one of the most widespread and reliable; it is supported by almost all programs on PC and Macintosh in one way or another related to graphics. Generally, TIFF is the best choice when importing raster graphics into vector programs and publishing systems. It has a full range of color models available from monochrome to RGB, CMYK and additional solid colors. TIFF may contain clipping paths, alpha channels, layers, and other additional data.

    The exception, to some extent, is FreeHand. Sometimes TIFF files in it can randomly change their location when creating a PostScript file or directly in the document when opening it. More often than not, TIFFs “jump” while in the clipping path. With FreeHand, it is still preferable to use EPS.

    TIFF can be saved in two recording orders: Macintosh and PC. This is because Motorola processors read and write numbers from left to right, while Intel processors read and write numbers the other way around. Modern programs can use both formats without problems.

    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. A number of older programs (eg QuarkXPress 3.x, Adobe Streamline, many text recognition programs) cannot read compressed TIFF files, but if you are using newer software there is no reason not to use compression.

    Adobe PostScript

    PostScript is a page description language (laser printer control language) from Adobe. It was created in the 80s to implement the WYSIWYG (What You See is What You Get) principle. Files of this format are a program with execution commands for an output device. They have the extension .ps or, less commonly, .prn and are obtained using the Print to File function of graphics programs when using a PostScript printer driver.

    Such files contain the document itself (only what was located on the pages), all associated files (both raster and vector), the fonts used, as well as other information: color separation boards, additional boards, screen lineature and raster dot shape for each board and other data for the output device. If the file is created correctly, it does not matter what platform it was made on, whether True Type or Adobe Type 1 fonts were used - it makes no difference.

    However, you need to keep in mind that even if you have made the correct settings in the print window, problems may arise due to the incorrect translation of the graphic language program you are using into the PostScript language (for example, the introduction of information about unused fonts). The most correct PS files are created by Adobe programs.

    Data in a PostScript file is usually written in binary encoding. Binary code takes up half the space of ASCII. ASCII encoding is sometimes required for transferring files over networks, for cross-platform sharing, and for printing over serial cables. In these cases, the binary encoding may become corrupted (making the file unreadable) or cause "strange" behavior by the file server. These problems have long been eliminated in modern systems, but older computers and servers are susceptible to them.

    The above applies to all PostScript-based formats: EPS and PDF, which are described below.

    A more detailed description of the PostScript language, its features, problems and methods of printing from various programs can be found on my website in the article “Non-scary PostScript”.

    EPS (Encapsulated PostScript)

    The Encapsulated PostScript format can be called the most reliable and universal way to save data. It 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. Like PostScript print files, EPS records the final work, although programs such as Adobe Illustrator and Adobe Photoshop can use it as a working document.

    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 necessary for printing, among them, such as Duotone, it can also record data in RGB, clipping path, trapping and raster information, embedded fonts. In EPS format, data is saved on the clipboard (Clipboard) of Adobe programs for exchange among themselves.

    You can save a sketch (image header, preview) along with the file. This is a low-resolution copy in PICT, TIFF, JPEG or WMF format that is saved with the EPS file and allows you to see what's inside, since only Photoshop and Illustrator can open the file for editing. All others import the sketch, replacing it with original information when printed on a PostScript printer. On a printer that does not support PostScript, the sketch itself is printed. If you work on Photoshop for Mac, save thumbnails in JPEG format; other Mac programs save thumbnails in PICT format.

    These and JPEG thumbnails cannot be used by Windows applications. If you're working on a PC or don't know where the file will be used, save the sketch in TIFF format (when given the choice). CorelDRAW also offers the vector format WMF for sketches, you should use this Microsoft brainchild very carefully - it will not lead to any good.

    Initially, EPS was developed as a vector format, later its raster version appeared - Photoshop EPS. In addition to the thumbnail type (TIFF, PICT, JPEG), Photoshop allows you to choose the data encoding method. ASCII, Binary and JPEG. The first two were described above; JPEG is worth focusing on.

    Photoshop allows you to compress raster data using the JPEG algorithm. Adobe has improved this compression method. Photoshop's JPEG now supports CMYK and compresses better than JPEG that fully complies with the original specifications. In other words, JPEG-encoded non-thumbnail EPS files weigh less than comparable JPEG files! However, I would like to draw your attention to an important feature when working with JPEG compression in EPS.

    Printer and phototypesetting drivers cannot perform color separations on such files. That is, when performing color separation on your computer, the JPEG-compressed EPS image will appear entirely on the first board (Cyan, usually). However, in the service bureau, Scitex workstations (the majority of them in Israel) can color separate pages with JPEG EPS illustrations without any problems. I think systems from other companies also support JPEG EPS, in any case it’s worth asking. In service bureaus and printing houses in Tel Aviv, I was often recommended to use JPEG EPS instead of TIFF for recording raster data, since it is faster to output.

    EPS has many varieties, depending on the creator program. The most reliable EPS are created by programs produced by Adobe Systems: Photoshop, Illustrator, InDesign. Since 1996, Adobe programs have a built-in PostScript interpreter so they can open and edit EPS. This opportunity seems to me very important. Other graphic editors cannot open EPS; moreover, the EPS files they create sometimes turn out to be, to put it mildly, special.

    Among the most problematic are Quark EPS, created by the Save Page As EPS function, and FreeHand editable EPS, created by the Save As function. You should not particularly trust Corel EPS versions 6 and lower and EPS from CorelXARA. EPS files from CorelDRAW 7 and higher still have the problem of adding fields to the Bounding Box (a conditional rectangle in PostScript that describes all objects on the page).

    Before exporting EPS files from CorelDRAW, CorelXARA and, to a lesser extent, FreeHand, it is worth converting many program effects (translucent fills, for example) into raster or simple vector objects. Thick outlines (more than 2 pt) may also make sense to convert into objects when the program provides such an opportunity. You can check the EPS file with Adobe Illustrator, if it opens, then everything is in order.

    PDF (Portable Document Format)

    PDF is proposed by Adobe as a platform-independent format for creating electronic documentation, presentations, and transferring layouts and graphics over networks. Used as an internal graphics format in Mac OS X.

    PDF files are created by converting from PostScript files or using the export function of a number of programs. Adobe Acrobat Distiller is used for conversion; this is the best way to create PDF. Creating PDFs using the export method from programs usually gives worse results - the files are heavier and often have problems with embedding fonts.

    To create PDF, there is also a PDFWriter program that works as a virtual printer. PDFWriter is not PostScript based and cannot handle graphics correctly. It is designed for quickly producing simple text documents. It has the same problem with embedding fonts as many programs that can export PDF. The most reliable and closest to the original PDF is created from PostScript and EPS files by the Acrobat Distiller program, supplied in the Adobe Acrobat package.

    PDF was originally designed as a compact electronic documentation format. Therefore, all data in it can be compressed, and different types of compression are applied to different types of information, the most suitable for them: JPEG, RLE, CCITT, ZIP (similar to LZW and also known as Deflate). The Acrobat Exchange 3 program (which in version 4 became simply called Acrobat 4.0) allows you to create hyperlinks, fill in fields, include video and sound in a PDF file, and other actions.

    The CCITT (International Telegraph and Telephone Committie) compression method was developed for facsimile transmission and reception. It is a narrower version of Huffman coding. CCITT Group 3 is identical to the fax message format, CCITT Group 4 is the fax format, but without special control information.

    The PDF file can be optimized. Repeating elements are removed from it, a page-by-page order is established for loading pages via the web, with priority first for text, then graphics, and finally fonts. However, when there are no duplicate elements, the file, after optimization, usually increases slightly.

    PDF is increasingly being used to transmit graphics and layout over networks in a compact form. It can retain all the output device information that was in the original PostScript file. This applies to PDF versions 1.2 (Acrobat 3) and higher. However, version 1.2 cannot include trapping information, some other specific data (DSC, for example), and does not use color profiles. All this is implemented in subsequent versions of the format.

    You can find a more detailed description of technologies based on Adobe Acrobat PDF on my website in the article Man-Orchestra 3.0.

    Scitex CT

    A PostScript file intended for output goes through a number of stages on its way to the phototypesetting machine. The most important of these is rasterization - the process of converting PostScript data into a bitmap, performed by the PostScript interpreter (RIP).

    CorelDRAW format files can be used to transfer/transfer works to a PC, but it is not advisable to import them into layout programs. On a Macintosh, CorelDRAW for Windows files open with the Macintosh version of CorelDRAW and Adobe Illustrator 8 or later.

    PICT (Macintosh QuickDraw Picture Format)

    PICT is a native Mac OS Classic format. Standard for the clipboard, uses the Mac OS graphical language. PICT is capable of carrying raster, vector information, text and sound, and uses RLE compression. Supported on Mac by all programs. Pure bitmap PICT files can have any bit depth (from Lineart to CMYK).

    Vector PICT files, which have all but disappeared from use these days, had strange problems with line thickness and other printing variations.

    The format is used for the needs of Mac OS, and when creating certain types of presentations only for Macintosh. Outside the Macintosh, PICT has a .pic or .pct extension and can be read by separate programs, but working with it is rarely simple and straightforward.

    WMF (Windows Metafile)

    The vector format WMF uses the Windows graphic language and can be said to be its native format. Used to transfer vectors via the clipboard. Understood by almost all Windows programs that are somehow related to vector graphics.

    However, despite its apparent simplicity and versatility, the WMF format should be used only as a last resort for transmitting bare vectors. WMF distorts color, cannot save a number of parameters that can be assigned to objects in various vector editors, cannot contain raster objects, and is not understood by many Macintosh programs.

    BMP (Windows Device Independent Bitmap)

    Another 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, in fact, is not suitable for anything else.

    Capable of storing both indexed (up to 256 colors) and RGB colors (more than 16 million shades). It is possible to use compression based on the RLE principle, but this is not recommended, since many programs do not understand such files (they may have the .rle extension). There is a version of the BMP format for the OS/2 operating system.

    Using BMP for purposes other than Windows is a common mistake for newbies. It is important to understand that it is not advisable to use BMP either on the web, or for printing (especially), or for simply transferring and storing information.

    RTF (Microsoft Rich Text Format)

    The RTF text format came here for its extraordinary ability to transfer texts from one program to another. It allows you to transfer formatted text from optical character recognition programs or text editors to graphics programs or in any other direction. RTF can be a good solution (and sometimes the only solution) when transferring non-Latin, for example, Hebrew text or Russian in Windows 95/98 Hebrew Edition from program to program.

    The secret to compatibility is the use of special RTF and Unicode formatting tags. It is Unicode (used as the basis of the Microsoft Word 97/98 format for Macintosh and PC) that allows you to easily transfer Russian texts from PC to Mac and back in MS Word 97/98 files (true for higher versions of Word).

    RTF is used as the main one in the TextEdit editor supplied with Mac OS X and in the WordPad program included with Windows.

    Today we will talk about image formats, their features and distinctive features. Many of us know that images have 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 graphic editor has the largest number of 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 it is convenient to make layout from this file, seeing all the 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 pixels per image when printed in dpi. It can also store several image layers plus channel transparency information. This format was mainly used 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, post them on the Internet and store them on disks.

    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. It makes the most sense to use this format 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 a 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 all but disappeared from use these days, had unusual line thickness problems and other variations during printing.

    The format is used for Macintosh, and when creating certain presentations only for Mac. On regular computers (not Macs), the PICT 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 the icon with smooth edges and also with a shadow, combined with different backgrounds, the icon mask in this case is ignored.

    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 of the tenth and earlier versions can be opened using 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. It is supported by almost all graphics 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 photo processing than the 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 proposed by Adobe, these are companies such as Leica, Hasselblad, Samsung, Pentax, Ricoh. If Photoshop does not have a raw camera for your camera, then 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 both in text editors by editing the code, and in any graphic editor for vector graphics (Adobe Illustrator, Inkscape, CorelDRAW, Corel SVG Viewer). SVG is an open standard and is not proprietary.

    Some of the advantages of the SVG format include: Scalability without loss of image quality. Text in SVG is text, not an image, so it can be selected, copied, and is indexed by search engines (when used on a website). The interactivity of the graphics makes it possible to attach your own events to each of the elements. 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 the number of HTTP requests. Small file weight compared to raster graphics.

    Which store any type of persistent graphical data (“images”) intended for subsequent visualization. The ways of organizing these files are called graphic formats. Once written to a file, the image ceases to be an image itself - it turns into digital data. The format of this data may change as a result of file conversion operations. Depending on the nature of the graphics supported, file formats are classified into one of the following types: raster format, vector format, metafile format. The most common graphic formats:

    AI (Adobe Illustrator, Adobe AI) - a metafile format developed by Adobe for Macintosh, Microsoft Windows, NeXT; used for recording and storing various types of images, including drawings, drawings and decorative inscriptions.

    PSD (Photoshop Document, Adobe Photoshop, Adobe PSD) is a raster format included in the Adobe Photoshop graphics editor; used by publishing systems on PC and Macintosh platforms. PSD allows you to record with or without compression (RLE) an image with many layers, masks, additional channels, contours and other graphic elements.

    ART is a format developed by Gonson-Grace, used for storing photographs and drawings.

    AutoCAD DXF (Drawing Interchange Format) and AutoCAD DXB (Drawing Interchange Binary) are two versions of the same format (without data compression), developed and supported by Autodesk for the AutoCAD CAD program running on the MS-DOS platform. DXB is a simplified (binary) version of the seven-bit DXF. In addition to AutoCAD, the format is supported by many CAD programs, CorelDRAW and others, in particular, for exchanging data of different types: vector-oriented data, texts, three-dimensional drawings. However, a number of programs that claim to support DXF import implement only some of its capabilities. DXF changes with each version of AutoCAD. DXF and DXB file names use the extensions *.dxf, *.dxb, *.sld, *.adi.

    BDF (Bitmap Distribution Format) is a raster format developed by the X Consortium for exchanging bitmap font data between X Window and other systems. There is no compression, the maximum image size is not limited, the color is monochrome. Each BDF file stores data for only one typeface (a group of fonts united by a single name).

    BMP is a raster format developed by Microsoft for Windows OS; supported by all graphic editors working under its control, capable of storing both indexed (up to 256 colors) and RGB color (16.7 million shades). Most BMP files are stored in uncompressed form.

    CDR (CorelDRAW Document) is a vector format initially known for its low stability and poor file compatibility. Many PC programs (FreeHand, Illustrator, PageMaker) can import CDR files. Starting from the seventh version, CorelDRAW in CDR files applies compression separately for vector and raster graphics; fonts can be embedded.

    CGM (Computer Graphics Metafile) is a standard (ANSI and ISO) and metafile format for displaying vector images on the Web, adopted at the end of 1998 by the 3WC (WWW Consortium). The format is focused on supporting a variety of graphic images, including artistic graphics, technical illustrations, cartography, and computer publishing systems. Although CGM contains many graphics primitives and attributes, it is less complex than PostScript, allows for the creation of more compact files, and supports the exchange of complex, high-quality artistic images. The format uses different types of compression (RLE, CCITT Group 3 and Group 4); the color palette is not limited. One CGM file can contain multiple images.

    CPT is a raster format of the Corel PHOTO-PAINT program, provides storage of full-color images and vector objects.

    DPX (Digital Picture Exchange Format; also known as SMPTE Digital Picture Exchange Format) is a raster format designed to store one film frame or video data stream; developed by Kodak Cineon, adopted by ANSI and the US Society of Motion Picture and Television Engineers (SMPTE) with minor modifications as a standard. The format is supported by Kodak programs.

    DWG is a vector format of the AutoCAD program from Autodesk, designed for storing drawings.

    EMF (Enchanced Metafile) is a metafile format developed by Microsoft for storing images as a sequence of commands leading to the reproduction of images. In November 2005, the vulnerability of EMF and WMF formats from “buffer overflow attacks” was discovered, and at the end of December, a family of Internet worms appeared. The infection occurred when users visited a number of sites that used the WMF vulnerability to download Trojan programs to a remote machine. Soon, stand-alone versions of viruses appeared, spreading in the form of email worms in attached image files. Microsoft responded to this threat by issuing Security Advisory 912840, as well as (January 11, 2005) patching Windows XP, Windows 2000 (Service Pack 4), and Windows Server 2003.

    3DS (3D Studio, ASC) - a format developed by Autodesk, a three-dimensional modeling tool (“scene description”); also used as an interchange format. The format ensures optimal distribution of resources on the PC platform, supports all colors without restrictions, and has no compression. Many 3D modeling programs read and write files in this format. Strictly speaking, 3DS is two formats that are used as exchange formats - binary with the *.3ds extension and text with the *.asc extension.

    EPS (Encapsulated PostScript, EPSF) is a simplified version of the PostScript format (PDL), developed by Adobe as a vector format, and later its raster version appeared - Photoshop EPS. The EPS format cannot contain more than one page in a single file and does not preserve a number of printer settings. Like PostScript print files, the EPS format records the final work, although programs such as Adobe Illustrator, Photoshop and Macromedia FreeHand can use it as a production tool.

    FH8 (FreeHand Document) is the eighth version of the FH format, intended only for Macintosh PCs. FreeHand itself, Illustrator 7 and a limited number of programs from Macromedia can work with it. Since the seventh version, the FH format has full cross-platform compatibility, however, some FreeHand effects are not compatible with PostScript.

    FIF (Fractal Image Format) is a format developed by Iterated Systems, used for storing photographs on the Internet, and supports its own FIF compression system.

    FITS (Flexible Image Transport System, FTI) is a raster format and image storage standard used by many organizations (including scientific organizations, government agencies) to store astronomical (obtained by orbital vehicles) and terrestrial images (in particular, radio astronomy data and digitized photographic images) . The format is widely used to exchange data between different hardware platforms and software applications that do not support a common file format. FITS is considered a fairly simple, uncompressed format with an “unlimited number” of shades of gray. It can store many types of data, including raster, ASCII text, multidimensional matrices, binary tables.

    GIF (Graphics Interchange Format) is a standard raster format for presenting images on the WWW; was developed in 1987 by CompuServe, overshadowing the older PCX and MacPaint formats. Main advantages: the ability to use on many platforms and the availability of an efficient 12-bit LZW compression algorithm with free (until 1994) implementations. The format allows you to well compress files in which there are a lot of uniform fills (logos, inscriptions, diagrams), record an image “through the line” (Interlaced mode), thanks to which, having only part of the file, you can see the entire image, but with a lower resolution (GIF supports resolution up to 66536x65536).

    IFF (Interchange File Format), ILM, ILBM, LBM (InterLeaved BitMap), Amiga Paint - a family of raster formats developed and supported for the MS-DOS, UNIX, Amiga platforms by Electronics Arts and Commodore-Amiga. A distinctive feature of IFF is its versatility: it can be used not only to support graphics, but also sound on all platforms except Amiga. IFF was previously known as the 24-bit format for MS-DOS, but it began to be replaced by the TIFF and TGA formats, and then by the JFIF format. Some characteristics of the IFF format: maximum image size 64 K by 64 K pixels; used in uncompressed and RLE compression versions, supports colors from 1- to 24-bit; “Major in Minor” number format, has a specification on CD; when used with MS-DOS and UNIX, file names may have *.iff and *.lbm extensions.

    JFIF (JPEG File Interchange Format), JFI, JPG, JPEG - a raster format from C-Cube Microsystems, has become most widespread, so most “JPEG” images would be more correctly called “JFIF”. Using JFIF, it is recommended to save only the final version of the work, since each intermediate save leads to data loss and distortion of the original image.

    PCX (PC Paintbrush File Format) is one of the most common raster formats; designed for storing illustrations in desktop publishing systems. The format was developed by Zsoft for the Paintbrush program, and after concluding an OEM agreement with Microsoft Corporation, it began to be used in various systems that work with graphics. Main characteristics: maximum image size 64 K by 64 K; 24-bit color support; uses RLE compression (can work without compression); supports work with CD-ROM. The PCX format versions are DCX and PCC, whose file names have the appropriate extension.

    PDF (Portable Document Format) is a metafile format proposed by Adobe for graphic files (vector and raster) containing illustrations and text with a large set of fonts and hypertext links for the purpose of transmitting them over the network in compressed form.

    PDS (Planetary Data System Format) is a NASA standard format for storing data collected by spacecraft and ground-based observations about the Sun, Moon and planets; is also used by other organizations to store similar data. The basis of the format is the object description language - ODL (Object Description Language). The maximum image size and colors in PDS format are unlimited; supported on all platforms.

    PGML (Precision Graphics Mark-up Language) is a vector format that describes graphics in terms of mathematical formulas rather than raster pixels, which saves disk space and allows image scaling without loss of resolution and other quality indicators. The format was submitted to the W3C (WWW Consortium) for consideration as a network standard by Adobe Systems, IBM, Netscape, Sun Macromedia; used on the Internet.

    Photo-CD (PCD, Kodak Photo CD) is a raster format developed by Eastman Kodak and designed for storing and playing full-color images (usually photographs) recorded at various resolutions on CDs. The format is supported by Photo CD ACCess, Photoshop, Shoebjx. The Photo CD format supports 24-bit colors, has its own compression system, a maximum image size of 2048x3072 pixels, allows you to store only one image per file, uses RLE and JPEG compression systems (in the DCT version). Kodak does not disclose further details.

    PIC (Pictor PC Paint, PC Paint) - a raster format developed by Paul Mace for drawing programs on the MS-DOS platform, is a hardware-dependent format created taking into account the requirements of IBM family of graphics adapters (CGA, EGA, VGA). The PIC format is similar to the PCX format; the file names use the *.pic and *.clp extensions.

    PICT (Macintosh QuickDraw Picture Format) is a standard for the Macintosh PC clipboard, supporting both raster and vector graphics. On a Macintosh PC, PICT works with all programs. On a PC it can be read by a number of programs, but working with it is rarely easy. PICT file names have the extension *.pic or *.pct.

    PNG (Portable Network Graphics) is a raster format approved as a standard by the W3C (WWW Consortium) and intended to replace GIF. The format provides indexing of up to 256 colors, support for 24- and 48-bit color representation (True Color) and the implementation of a transparency channel (the so-called alpha channel). The dynamic lossless PNG image compression algorithm is 10-30% more efficient than a similar type of compression implemented in the GIF format.

    PS (PostScript) - the format of the PostScript page description language (also known as the laser printer control language) was developed in 1984 by Adobe. The format is used for printing and storing fonts, as well as for exchanging documents formatted with it. The advantage of the PS format is that it uses a device-independent playback system (including printer or screen type).

    RAF (RAW) is a raster format used in digital cameras and maintains the image directly in the form in which it was captured by the camera sensor. Using this format eliminates artifacts associated with pre-processing of the image by camera software (for example, during JPEG compression) and provides the photographer with the ability to further process photographs (adjust exposure, change color balance, increase size).

    Scitex CT is a raster format developed by Scitex; differs slightly from TIFF, with the exception of one feature: on phototypesetting machines (Imagesetter) from Scitex Dolev, files of this format are output somewhat faster. On a PC, file names in the Scitex CT format have the extension *.sct.

    SWF (Shockwave Flash) is an internal vector format of the Macromedia Flash program, used for animation on the Internet.

    TGA (TrueVision Targa) - a Truevision format developed for color television, supports RLE compression, file names have the *.tga extension.

    TIFF (TIF, Tagged Image File Format) is a raster format developed by Aldus Corporation, originally intended for large, high-resolution graphic images obtained by scanning. The format is characterized by high quality of transmission and preservation of the color of the original images. Subsequently, the format was adapted for professional graphics packages and expanded.

    WMF (Windows Metafile, Microsoft Windows Metafile) is a metafile format created for use with Windows OS, used for transferring vectors via the clipboard. WMF is supported by almost all programs running under Windows and in one way or another related to vector graphics. Despite its apparent simplicity and versatility, it is recommended to use the WMF format only in extreme cases for transmitting so-called naked vectors. WMF distorts color, does not save a number of parameters that can be assigned to objects in various vector editors, and is not understood by programs targeting the Macintosh PC. WMF files use the *.wmf extension.

    VML (Vector Mark-up Language) is a vector format that was submitted to the W3C consortium by Microsoft, Hewlett-Packard, Autodesk, Macromedia, Visio; used on the Internet.

    File formats are the basis of working with digital photographs. will tell you about all the major graphic file formats.

    RAW.

    A file format containing raw information coming directly from the camera sensor. These files are not processed by the camera's processor (unlike JPG) and contain original shooting information. RAW can be compressed without losing quality.

    The advantages of RAW are obvious - unlike JPG, which was processed in the camera and already saved with data compression - RAW gives the widest possibilities for processing photographs and maintains maximum quality.

    Note. Different camera manufacturers use different algorithms to create RAW in their cameras. Each manufacturer comes up with its own resolution for its RAW file - NEF - Nikon, CR2 - Canon...

    JPEG (aka JPG).

    This is the most common graphics file format.

    JPG has earned its popularity due to its flexible data compression capabilities. If necessary, the image can be saved with maximum quality. Or compress it to the minimum file size for transmission over the network.

    JPG uses a lossy compression algorithm. What does this give us? An obvious disadvantage of such a system is the loss of image quality every time a file is saved. On the other hand, image compression simplifies data transfer by 10 times.

    In practice, saving a photo with minimal compression does not result in any visible degradation in image quality. That is why JPG is the most common and popular format for storing graphic files.

    TIFF.

    The TIFF format is very popular for storing images. It allows you to save photos in various color spaces (RBG, CMYK, YCbCr, CIE Lab, etc.) and with high color depth (8, 16, 32 and 64 bits). TIFF is widely supported by graphics applications and is used in the printing industry.

    Unlike JPG, a TIFF image will not lose quality every time the file is saved. But, unfortunately, it is precisely because of this that TIFF files weigh many times more than JPG.

    The rights to the TIFF format are currently owned by Adobe. Photoshop can save TIFF without merging layers.

    PSD.

    The PSD format is used in Photoshop. PSD allows you to save a raster image with many layers, any color depth and in any color space.

    Most often, the format is used to save intermediate or final results of complex processing with the ability to change individual elements.

    PSD also supports compression without loss of quality. But the abundance of information that a PSD file can contain greatly increases its weight.

    BMP.

    The BMP format is one of the first graphic formats. It is recognized by any program that works with graphics; format support is integrated into the Windows and OS/2 operating systems.

    BMP stores data with a color depth of up to 48 bits and a maximum size of 65535x65535 pixels.
    At the moment, the BMP format is practically not used either on the Internet (JPG weighs several times less) or in printing (TIFF copes with this task better).

    GIF.

    The GIF format was created in the early days of the Internet for sharing images. It can store lossless compressed images in up to 256 colors. The GIF format is ideal for drawings and graphics, and also supports transparency and animation.
    GIF also supports compression without loss of quality.

    PNG.

    The PNG format was created to both improve upon and replace the GIF format with a graphics format that does not require a license for use. Unlike GIF, PNG has alpha channel support and the ability to store an unlimited number of colors.

    PNG compresses data without loss, which makes it very convenient for storing intermediate versions of image processing.

    JPEG 2000 (or jp2).

    A new graphics format created to replace JPEG. For the same quality, JPEG 2000 file size is 30% smaller than JPG.

    When highly compressed, JPEG 2000 does not break the image into squares characteristic of the JPEG format.

    Unfortunately, at the moment this format is not very widespread and is supported only by Safari and Mozilla/Fireox browsers (via Quicktime).