• Raster graphics file formats. Vector formats

    GIF(Graphics Interchange Format)
    The GIF format was developed in 1987 by the computer information service CompuServe. Advantages
    1. Small size, which can be achieved with limited color scheme- no more than 256 colors.
    2. Transparent background.
    3. Animation.
    And another important factor is that the LZW compression algorithm for the GIF format is patented. Unisys has held the patent since 1994 and began charging developers who use GIF format. PNG(Portable Network Graphics)
    The fruit of the community of independent programmers - a response to the transition of the most popular GIF format into the category commercial products. The PNG format does almost everything that the GIF format does, except for animation. Advantages
    1. The best data compression - compresses raster images not only horizontally, but also vertically.
    2. Supports color photographic images up to and including 48-bit.
    3. 256 levels of transparency.
    Picture size in PNG format will be less than GIF. But the smallest details will be easier with GIF, because in the file PNG images About 1 Kb is occupied by a description of the color palette, which is sometimes comparable to the size of the image itself. PNG-24
    A format similar to PNG-8, but using a 24-bit color palette.
    This allows you to save photographs and complex drawings in this format. Advantages
    1. Full color palette.
    2. High-quality transparency allows you to overlay the design on any background
    GIF and regular PNG are cut at the edges and therefore transparency is suitable for a certain background - light. JPG, JPEG, JFIF(JPEG File Interchange Format)
    To search the best way compression of photographic quality images, two standards organizations - the International Telecommunications Union (ITU) and the International Organization for Standardization (ISO) - created the Joint Photographic Experts Group (JPEG).
    Uses lossy compression. With this compression, information that is not essential for the perception of the image is removed. WBMP(WAP BitMap)
    monochrome (two-color) images.
    The maximum image size should not exceed the card size limit - 1.5 KB. BMP(BitMap)
    The simplest raster format BMP is a native Windows format. BMP stores color data only in the RGB model, meaning it is a format designed for use on screen. PCX(PCExchange)
    Images in PCX format can be viewed with most DOS programs. Like VMR, this format is largely outdated and is supported by modern graphic programs solely for compatibility with antique software. TIFF, TIF(Tagged Image File Format)
    Originally developed by Aldus for its PhotoStyler graphics editor. As a universal storage format raster images TIFF is widely used, primarily in publishing systems that require the best quality images. Due to its compatibility with most professional image processing software, the TIFF format is very convenient when transferring images between computers various types(for example, from PC to Mac and vice versa). PSD(Photoshop)
    Format Adobe Photoshop, differs in the ability to store layers. Convenient only for processing in Photoshop and for storing the source for editing in the future. RAW(RAW Image Data)
    The format is designed for digital cameras. This exact copy The image captured on the matrix during shooting consists of three photographs taken in red, blue and green colors.
    RAW file extensions different manufacturers may differ, and it is not always possible to open them using image processing programs.
    Although if a camera supports saving RAW, then, as a rule, it comes with some kind of program for processing files of this format.
    Currently, Adobe Corporation has proposed the DNG (Digital Negative Specification) format, which was created in order to make life easier for manufacturers of graphics tools. Some companies (Leica and Pentax) have already included DNG in their cameras, but most camera vendors still continue to use their formats.
    RAW format extensions
    .dng - Adobe (generic)
    .crw .cr2 - Canon
    .raf - Fuji
    .kdc - Kodak
    .mrw - Minolta
    .nef - Nikon
    .orf - Olympus
    .ptx .pef - Pentax
    .x3f - Sigma
    .arw - Sony

    Vector graphics

    CDR(CorelDRAW)
    The format of the popular CorelDRAW, which is the undisputed leader in the vector class graphic editors on the RS platform. Having relatively low stability and problems with file compatibility different versions format. A.I. (Adobe Illustrator)
    Being part of the Adobe family, they support almost all programs that are somehow related to vector graphics. The best intermediary for transferring images from one program to another, from PC to Macintosh and vice versa. It is distinguished by the greatest stability and compatibility with the PostScript language, which is used by almost all publishing and printing applications. WMF(Windows Metafile)
    Another dear Windows format, this time vector. Understood by almost everyone Windows programs, one way or another related to vector graphics. EMF(Enhanced Metafile)
    Similar to WMF.

    OTHER FORMATS

    SWF(ShokWaveFlash)
    Flash format, a product of Macromedia, which allows the development of interactive multimedia applications. Sphere using Flash different, it can be games, websites, CD presentations, banners and just cartoons. When creating a product, you can use media, sound and graphic files, you can create interactive interfaces and full-fledged web applications with using PHP and XML. SVG(Scalable Vector Graphics)
    Standard Recommended World Wide Web Consortium for describing using XML markup two-dimensional vector and combined vector- raster graphics.
    In the browser, SVG graphics are rendered using raster engines. Support for translucency in each layer, linear gradients, radial gradients, visual effects(shadows, washes, shiny surfaces, textures, patterns of any design, symbols of any complexity).
    SVG is a format for two-dimensional vector graphics- as defined in the specification, but by adding a script (namely JavaScript) inside SVG file You can create 3D animated images.
    SVG can have a built-in raster image, which, like any other object in SVG, can have transformation, transparency, etc. applied to it. ICO(Icon)
    Icons are used in all kinds of programs on a computer and smartphone. But to an ordinary person Typically, you may need to create or use an icon on your site.
    Many people are trying to start their own website. Even if you use ready-made template site with a style that just needs to be filled in, it would still be good for you to make a unique icon. An icon on the Internet is used as a symbol of a site, a logo. For example, now you see a red square in address bar. If you add a page of our website to your favorites, our icon will appear next to the link, which will help you quickly visually find the link to the site. Actually, this is the main purpose of an icon on the Internet.

    PostScript

    EPS(Encapsulated PostScript)
    The most reliable and in a universal way saving data. It uses a simplified version of PostScript, 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.

    WHICH FORMAT SHOULD I CHOOSE?

    For the Internet
    photograph or drawing with flowing tones JPEG
    picture with straight lines,
    small range of colors
    with a smooth fill (no gradient)
    GIF
    PNG
    complex picture with transparent background PNG-24
    animation SWF
    icons ICO
    For printing and storage
    Printable TIFF
    For storage PSD
    For logo EPS (CDR AI)
    Logo for MS Office WMF
    For photography
    For storing and printing photos, but not low quality JPEG
    For printing and for the original of the best quality RAW
    Of course, the best format for storing e.g. logos are EPS. which supports vector and is equally suitable for both vector and raster editors.

    Any digital photograph is essentially a software file that stores information about the image obtained by digitizing each of its points and how and when it was taken. The data structure of this information is called photo file format or in another photo file format.

    There are many such formats, and they all belong to the graphic type. They differ in the information compression algorithm, specification and purpose. Each photo file format was designed for its own purposes and is better suited for them than others. For example, for storing images, processing or posting them on the Internet.

    There is one way to obtain the original digital photograph. It is necessary to project a frame of a future photograph onto a matrix consisting of many light-sensitive photocells, measure the signal level of each of them and write all these values ​​into a photograph file. This division of a photograph into individual points - pixels - is called a raster, and its file format is called raster (Fig. 1).

    Fig.1 Any digital photograph consists of individual pixels, information about which is stored in a raster file.

    You can make a raster format photo file using two main devices - a digital camera or. But at the same time, the number of formats in which photo files can be saved is limited. To obtain photo files of a different format, they must be converted in a special program (Fig. 2).

    Fig.2 Methods for obtaining digital photo files in raster formats.

    Changing the photo file format may be necessary for various reasons. For example, to reduce the size of photo files, to maintain maximum image quality, or to be able to work with layers. There are other reasons, but in any case, each photo file format should be used for its intended purpose.

    Basic Photo File Formats

    File names of digital photographs of any photo format as well as program files other types consist of a variable part, a point, and an extension. The extension of photo files is always the same and can consist of three or four characters, which determine the file type or format name. For example, jpeg, cr2, tiff, psd, gif (Fig. 3).

    Fig.3 The file extension of a photo indicates its format.

    JPEG is considered a universal format for digital photo files. This is the most popular raster format that is used to save photographs in different types photographic equipment. It is convenient to work with it in various photo editors and use it to view photos in all technical devices. Its main drawback is the loss of image quality when saving a file (Fig. 4).

    Fig.4 Loss of image quality of a photo when saving its file in JPEG format.

    Except JPEG format Expensive photographic equipment often uses the RAW format. A file of this format stores the most full information about the image and all the camera settings with which it was taken. This gives enormous advantages when processing photographs and allows you to eliminate many photography errors (Fig. 5).

    Fig.5 Using special program In RAW photo files, you can change camera settings.

    RAW format is common name several formats used in photographic equipment from different manufacturers. Each such format has its own characteristics and is not unified. To bring everything existing formats RAW to a single standard, the DNG format was developed. Essentially this is the same RAW format, but its file size is smaller and there are no additional text files(Fig. 6).

    Fig.6 Files of the same photo in RAW format and DNG have different sizes and methods for storing text information.

    In cases where it is necessary to save the results of color processing, layers, channels, masks or any other photo editing attributes, the PSD format is used. This is an internal file format Photoshop programs, in which you should save all information about changes in photographs after taking photographs (Fig. 7). The main disadvantage of this format is its limited application.

    Fig.7 In files PSD format Conveniently store information about photo editing (example file).


    The TIFF format is another file format used to store digital photographs. It allows you to maintain maximum image quality, but at the same time the size of such a file will be the largest in comparison with other listed formats (Fig. 8). In digital photography it is used for high-quality color work.

    Fig.8 Comparison of file sizes of one photo saved in different photos formats.

    The five photo file formats discussed above - JPG, RAW, DNG, PSD and TIFF are considered the main ones for storing, processing and viewing digital photos. But such formats are not suitable for effectively demonstrating photographs to the viewer. To do this, you need to choose other formats designed for this purpose.

    File formats for displaying photos

    The main purpose of all photographs is to show them to the viewer. Unlike paper photographs, many digital photographs can be displayed more accessible and interesting by using suitable file formats. For example, photographs can be animated and posted on the Internet, with music, text and various special effects applied to them.

    Most convenient way to show photographs to a large number of viewers is to post them on the Internet - on photo sites, on social networks or (Fig. 9). In this case, the format of the photo files should be such that their sizes are as small as possible and the image is of good quality. There are three suitable formats for this.

    Fig.9 Example of placing digital photos in the cloud.

    The main format for posting photographs on the Internet is the same JPEG, but with a high degree of information compression. It is ideal for this purpose. A photograph file in this format measuring 600 by 900 pixels can be compressed to 50 - 70 kb and the image will still look normal.

    The second popular format that was created for quickly transmitting raster images over networks is GIF. This format allows you to significantly compress digital photo files without losing image quality. In addition, in this format you can save animation and transparency of the image layer (Fig. 10). The main disadvantage of the GIF format is its limitations in color reproduction.


    Fig.10 GIF photo file with animation.
    (hover over image)

    For better color transmission on the Internet, the PNG format was developed. This format has a higher compression ratio without loss of quality graphic information unlike the JPEG format and can store an unlimited number of colors, unlike the GIF format. In addition, PNG files can be used as an alternative format for photo editing.

    Using all of the above formats, photo files can be stored and viewed individually. But there is another way. If the photos are combined and saved in video format, they will become one file. At the same time, you can make a beautiful slide show from them with music, text and special effects. Several formats are suitable for this purpose: MPEG4, MOV, AVI, WMV, FLV (Fig. 11). But this is not all formats.

    Fig. 11 Example of a slide show of photographs in MPEG4 file format.
    ()

    To store and view digital photos in one file, you can also use the most popular book PDF format. In this format, photographs can be stored in one photo album. This makes it possible to create for them interactive menu quick search or view photos as a slide show (Fig. 12).

    Fig. 12 Example of storing digital photos in a PDF file.
    ()

    That's probably all there is to it general overview formats for files in which to store digital photos. When selecting formats for specific purposes, you need to know more about them - features, advantages, disadvantages. Read more about each of these formats in the following articles.

    IN hello seven. When publishing new article, the question often arises, what format should I use images in the article? In order to achieve the best result, you should select a raster image format.
    In this article, we will briefly discuss the popular GIF and the JPEG format, and then analyze the PNG format, and dispel some misconceptions about the use of certain formats.

    GIF (Graphics Interchange Format) image format

    Most color images and backgrounds on the Internet are GIF files. This compact format is known for its small image files. GIF images, do not contain millions of colors, this figure is no more than 256. In addition, the GIF format supports animation, that is, using this format, you can do .

    The GIF format has its own palette index. It contains a color palette index, up to 256, and for each pixel in the image, it has a corresponding color index. If you change the image and save it as a GIF, the image quality will not be lost.

    As I already said, the GIF format supports animation, which, in Web times 1.0, was shown in the form of numerous flashing images, rotating icons, and thus greatly irritated many users. In the more civilized era of Web 2.0, we still notice beautiful animation"Loading..." while waiting for the query results to refresh the page.

    GIF also supports transparency, which is kind of boolean type transparency. A pixel in an image can be either completely transparent or completely opaque.

    JPEG (Joint Photographic Experts Group) image format

    JPEG has no limit of 256 colors. It can contain millions of colors, which is why it has high compression. This makes it suitable for photographs where high clarity, sharpness and quality are needed, so most digital cameras They work in JPEG format.

    This format is lossy, meaning you will lose quality with each new edit, so if you plan to make a lot of edits, it is better to use a different format to store intermediate results. However, there are some operations that can be performed without loss of quality. Such as stretching the image, rotating it on an axis, or changing meta information such as comments that are stored in the image file.

    JPEG does not support transparency.

    When optimizing an image in this format, to obtain best results set compression to 50%. JPEG compresses the photo-quality graphics and color depth of more competing formats such as GIF, and also supports greater degree accuracy of color matching.

    PNG (Portable Network Graphics) image format

    This format was created specifically for the Internet to supplant the GIF format. The main advantage of the PNG format is that it supports 24-bit color and transparency.

    PNG is lossless and comes in several forms, but for practical purposes it is used in only two ways:

    2. PNG24 (full color)

    PNG8, like GIF, has an image palette.

    Let's compare the PNG8 format with GIF:

    Advantages:

    1. PNG usually produces a smaller file size;
    2. PNG supports variable transparency;

    Flaws:

    1. There is no animation;

    The second type of PNG, full-color PNG, can contain millions of colors, just like JPEGs. You may sometimes see names like PNG24 or PNG32.

    PNG-24 combines the features of JPEG and GIF: it supports 24-bit color, retains transparency and is therefore good for halftones. The image size is usually larger than JPEG. This makes the full-color PNG format ideal for applications where file size is not an issue, such as screenshots or graphical tutorials.

    Let's draw a conclusion on the use of formats:
    1. JPEG is the best format for photos.
    2. GIF is best format for animation.
    3. PNG8 - format for: icons, buttons, backgrounds, website graphics.

    Photographs and pictures differ from each other not only in content, but also in other “computer” characteristics. For example, by size.

    It happens that there seem to be two identical drawings, but one is three times larger in size than the other.

    The images also differ in quality. I think you have come across photos more than once poor quality. This is visible to the naked eye. For example, two identical photos, but one is of better quality, and the other is of worse quality.

    And it happens that the drawing seems to lack colors. Here's an example.

    And the file format or type is responsible for all this.

    Note: Images come in the most different formats. And there are very, very many of them. We will not consider them all, but will talk about the most common ones: bmp, gif, jpg (jpeg), png, tiff.

    Image formats differ from each other primarily in quality. And the quality differs in the number (saturation) of colors.

    For example, I paint a picture using different colors. And then suddenly some of them are over, and you have to finish painting with what you have. Of course, I will try to do everything possible so that this does not greatly affect the result, but still the picture will not turn out the way you want - more faded, blurry.

    That's how it is with image formats. Some leave all the colors, while others cut off some. And sometimes this causes the picture to deteriorate.

    This is a rough example - in fact, everything is somewhat more complicated there. But I think you get the point.

    Common image formats

    BMP is a format for drawings made in the Paint program. It can be used to store drawn pictures on your computer. But on the Internet this type is not suitable due to the large volume. So if you want to post a Paint picture on a blog or social network, it must be of a different type - gif, jpg or png.

    GIF is a popular image format on the Internet. You can save images in it without losing quality, but with a limited number of colors - 256. GIF has gained particular popularity due to the fact that in this format you can create small animated (moving) pictures.

    JPG - format of photographs and paintings with a large number flowers. You can save an image in it both without loss of quality and with loss.

    PNG is a modern picture format. This type of image is small in size and without loss of quality. Very convenient: the file is small and the quality is good. It also supports transparency.

    TIFF - images are very good quality, no compression. Accordingly, the size of such files is huge. TIFF is used when the quality is great value. For example, when creating business cards, booklets, magazine covers.

    Which format to choose

    • BMP - if this is a drawing made in Paint program, and you're only going to keep it on your computer.
    • GIF - if it is an animation or drawing with a small number of colors for publication on the Internet.
    • PNG - if this is a picture that has a lot of colors or some transparent parts.
    • JPG (jpeg) - if a photograph.
    • TIFF - image for printing (business cards, booklets, posters, etc.).

    It was last Friday, but it was not possible to write a Friday post under N3. The reason is banal - lack of free time due to the housing issue and a number of other problems. But this Friday there will be a photo for sure. It already exists and was ready for publication yesterday, but I still decided to spend my free evening time on renovation work in the apartment. Therefore, if you haven’t watched it, be sure to watch it and cheer yourself up.

    Let's return to the topic of the post, or rather to the question, what picture formats are there? In general the word "picture" I don't like it when applied to photography. But this is exactly how this question sounds very often, so I decided to leave everything unchanged. I'll just make one clarification. Since a photograph is a raster image, this post will only talk about raster graphics formats.

    At all graphic formats — a set of rules for processing received graphic data for the purpose of their further storage or editing. As they say in the lines of V. Mayakovsky “All professions are needed, all professions are important”... The same can be said for image formats.

    The developers offer a lot raster formats, intended for storing files. Among the most frequently used are the following: BMP, TIFF, GIF, JPEG, PNG, PSD, ICO.So, let's look at some of the pros and cons, as well as the scope of application of the listed raster image formats.

    Raster image formats

    • BMP-(abbreviation for Bit Map image) represents standard raster format and has a universal purpose. It is supported by most graphics editors, including the fairly common one Paint. Initially, coding in it was performed by the most in a simple way, By . But this turned out to be wasteful, since each pixel was represented by only one byte. Consequently, only 256 colors became available, which significantly limited the ability to transmit images. Subsequently, it was improved somewhat. Bit Map image almost optimal for storing data and sharing it with other similar applications. But, at the same time, it takes up too much memory space, since it is necessary to save the encoding of all image points. File BMP does not support animation and interlacing.
    • TIFF(from Tagged Image File Format)– universal for publishing systems and topographic graphics. Such raster image formats provide high quality print. They were created to support almost all programs designed to work with bitmap files, so they are compatible with all platforms. Widely used TIFF in printing and publishing. Files (scanned images, illustrations, faxes, etc.) with the extension .tif stored in this powerful format for later color printing, although monochrome printing is also available - in views CMYK And RGB. Does not apply to publishing images in computer network or when creating websites, because it is quite large in size. It is also unsuitable for animation.
    • GIF(according to the first letters of Graphic Interchamge Format)serves for storageraster images in graphicsand for sharing them. It is one of the “oldest” on the Internet, it is already in circulation long time, despite the fact that it uses indexed colors (in a limited set). Files with the extension.gifwidely used in the design of Web sites. Among the main advantagesGraphic Interchamge Format It is worth mentioning that the appearance of the image does not depend on the underlying platform or the type of browser, and compression occurs without loss of information. This format displays high-quality drawings with a small amount of uniform colors, drawings, transparent pictures and animation.GIFsmall in size, so it loads quickly, which is important when creating HTML pages. But still, the format has a significant drawback - it has a small range of colors, which limits its capabilities when storing images that have smooth transitions.
    • JPEG(abbreviation for Joint Photographic Expert Group) helps get rid of the flaws that arise when creating and saving images in GIFs. This uses a compression method for photographs or other images. These raster formats graphic files are the most common when storing multi-color pictures. Compressing images (they are stored in files marked .jpg) is performed in a smooth mode, which ensures a high degree of processing and reduces data loss. On the hard drive in JPEG convenient to save a significant number of pictures, in particular large photographs with smooth transitions. This allows you to significantly save disk space. Also using JPEG It is possible to publish photos of quite acceptable quality on a computer network. But it should be taken into account that during compression some of the data is lost, and when saving the same image again, the chances of irreversible loss of information increase. In this regard, the situation is greatly improved by the improved version of the format - JPEG 2000. However, it is not supported by all browsers, which slows down its spread.
    • PNG(portable network graphics) allows you to store raster graphics in a lossless compressed form, and the files are smaller in size than GIF. In format PNG Almost any color, as well as transparency, is available. This circumstance opens up wide possibilities in web design. Now it is constantly popular because it is compatible with all platforms, supports interlaced display, has a significant color gamut, and supports animation.
    • Domestic PSD raster graphics formats (short for PhotoShop Document) are intended for program packages. They support all types of images, as well as their layers during processing. Saved in files marked with extension .psd.

    There are others raster graphics formats, which were not discussed in the article, but you can write about them in the comments, without forgetting about the competition!