• Image formats: which one to choose? Computer Graphics Basics

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

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

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

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


    General purpose formats

    Microsoft Windows Bitmap (BMP)

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

    Kodak Photo CD (PCD).

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

    Zsoft PC PaintBrush (PCX)

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

    Tag Image File Format (TIFF)

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

    TrueVision TGA (TGA)

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

    Graphics Interchange Format (GIF)

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

    Joint Photographic Experts Group (JPEG)

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


    Specific formats

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

    Igor Sivakov

    28.06.2016

    The photo extension is the extension of the file in which the photo was saved. In turn, the file extension denotes the type of data saved and indicates the file format.

    A raster image is made up of pixels, and how these pixels are stored in a file and how this file itself is structured and “speaks” about the file format.

    The extension is given after the file name, after a dot, and most often consists of 3 characters (for example: photo.jpg).

    The choice of file type and format (i.e., its extension) in which the photographer should save the image directly depends on the resolution of the photo.

    Namely, the quality of the resulting image depends on such a characteristic as resolution. The quality of an image is determined by the number of pixels: the more pixels there are, the higher the level of detail in the photo.

    Not all existing formats files are able to save good extension photos. Therefore, you should approach the issue of choosing a format very carefully.

    Most Common Photo File Formats

    For digital photographs, the most popular formats are considered to be TIFF, JPEG, RAW, PNG, GIF. Modern cameras are capable of receiving photographs in any of the listed formats. Therefore, photographers themselves often argue among themselves in which of these formats images are saved more successfully.

    The choice of format determines not only the quality of the photo itself, but also the file size (i.e., its weight) in which the image is saved. The size determines how quickly the photo will load on the screen or how quickly it will be downloaded to another medium (for example, from a camera memory card to hard drive computer).

    But according to statistics, it can be argued that the most common is still the JPEG format, since it allows you to save high quality photos. If desired, the weight of a JPEG image can be reduced in graphic editors such as PhotoShop, without significantly spoiling the quality of the image.

    Learn more about choosing a digital photo recording format

    So, let's look at the main features of popular photo formats.

    RAW format

    • in essence, it is an analogue of a film negative (unlike other formats, which are a digital analogue of a slide),
    • intended for further processing and saving either in convertible form or in another format depending on the photographer’s purposes (for example, if printing is needed, then in TIFF or JPEG; if used for the web, then in PNG and GIF),
    • provides the most best quality photo,
    • has large size and requires sufficient space on the memory card,
    • stores all the original information about the photo.

    TIFF format

    • completely preserves the high quality of the photo,
    • great for printing,
    • saves data and information about the photo,
    • photographs in this format are very large in size (weight), which makes it difficult to post them on the Internet.

    JPEG format

    • most popular format
    • can be read and opened by any graphic programs,
    • allows you to save photos in high quality,
    • suitable for printing,
    • suitable for posting on the network, since the size can always be reduced in a graphic editor,
    • has a disadvantage - loss (with frequent opening and closing, part of the data is lost).

    PNG format

    • just like JPEG, it allows you to maintain the quality of the image while reducing its weight/size,
    • allows you to make elements translucent (using a graphic editor),
    • convenient for use on the Internet,
    • Suitable for creating web designs as you can control its size and transparency.

    GIF format

    • allows you to combine graphics with animation,
    • has light weight,
    • suitable for uploading to the Internet and for creating web design,
    • image quality suffers due to weight reduction,
    • not suitable for printing,
    • has a limited color palette.

    Thus, the photographer can choose which format to use in certain situations and depending on the work tasks facing him. Therefore, if you need to make a colorful print, then it is better to use a convertible RAW or JPEG, but if you want to use a picture in the design of your website, then turn to PNG and GIF.

    It is also popular to use the PSD format (format PhotoShop programs) to store a photograph on a computer for further processing.

    Based on the foregoing, we can conclude that you need to devote no less time to expanding the photo than to other parameters of the image.

    Interesting publications on the site

    06/29/15 17.5K

    Let's say you've just completed a design project and are about to save the file, at which point you need to select correct extension for the file. If you do not understand the difference between these formats, then it will be quite difficult to choose the appropriate one, but today we decided to help you and explain one simple thing:

    There are many image formats, but only a few are important

    There is one main rule - each task has its own image formats. There are many various formats, which you will never even encounter, especially if you are engaged in print design.

    Let's try to find out what image formats may be useful to us.

    Raster and vector images

    To really understand the difference between image types, you first need to understand how raster images differ from vector images.

    Raster images are made up of pixels and can be expressed as anything from simple illustrations to complex images such as color photographs.

    Since raster images are made up of a fixed set of pixels, there is a loss of quality when scaling them, especially if they are enlarged. They are often used as a final product, ready to be sent to print or published on a website.

    Vector images aren't really images at all - they're something like mathematical formulas, directly interacting with the computer, telling it the coordinates of the shapes that need to be displayed. Thanks to this, vector images can be scaled without loss of quality, since the formula simply adjusts to the required dimensions of the final drawing.

    Vector images are used to create text and logos, and they are not capable of displaying complex graphic products such as photographs. They are usually used as working files, which are later converted into raster images for websites. But with their help you can also develop graphics for subsequent printing:

    Choosing the right image formats

    The classification of the main file types used in print and web design involves more than a simple division into vector and raster. Both raster and vector are just two large families that include many different image formats with different advantages, disadvantages and purposes.

    Raster formats

    JPEG


    Many people don't like JPEG, but it's worth noting that it's just not really suitable for printing. The JPG format uses strong compression. This is good if you want to keep file sizes as small as possible, but it is not entirely suitable in terms of the quality of the image you are going to print. Therefore, this format cannot be used when creating, say, logos.

    It is thanks to its small file size that JPEG is often used in web design, as it has a positive effect on page loading speed. JPG format is also widely used for digital photos, since the loss in quality is unnoticeable, and thanks to its smaller size, many more pictures fit on a flash drive or hard drive.

    Given all these advantages, JPG has established itself as the "standard" format for everything outside the design field. In practice, you will likely encounter clients who provide their own logos in terrible quality, or those who prefer to work exclusively with this format because it is the only one they know. Do everything you can to attract their attention to other, more suitable formats.

    GIF


    No one seems to ever pronounce the name of this format correctly. Designers often pronounce the first letter G clearly or dictate all three letters in turn, however its creator, Steve Wilhite, states that the correct way to pronounce the name is "jeev". Although its abbreviation stands for Graphics Interchange Format (“ image exchange format"), and it itself is mainly used in web design.

    Advantage of GIF ( which also distinguishes it from other web image formats) is that these pictures can be animated.

    In addition, GIF supports transparency, which can sometimes significantly reduce the weight of files. However, the concept of small weight is relative, since the more colors used, the larger the file will weigh. It is also important to consider the number of frames, since each frame also affects the weight of the file and increases the loading time of the web page.

    PNG


    The PNG format combines the advantages of JPG and GIF, however, it has clear recommendations for use. Like JPG, the PNG format is ideal for photographs, and at the same time allows you to save even better image quality than JPG. PNG also supports transparency, so it's almost ideal option for designers who want transparent elements but can't sacrifice graphic quality.

    The main disadvantage of PNG is its large file size, which negatively affects site loading speed. This format is best used selectively for elements that require high quality, which JPG and GIF cannot offer ( e.g. high quality logos). PNG is also a raster image format, so you risk losing quality when scaling such files.

    TIFF


    TIFF (sometimes TIF) is an uncompressed file format, which means that when saved it is not compressed at all. TIFF also supports layering.

    This format is often called " ready to print” although most printers work better with native file types like AI and PSD.

    In addition, TIFF is too heavy a format for web design. And file sizes can be intimidating for inexperienced clients, so try to prepare projects in more common formats.

    PSD


    PSD is a native format Adobe programs Photoshop. This means that these files can only be edited seamlessly in Photoshop.

    PSD cannot be used on website pages, and we strongly discourage you from sending design previews to clients in this format. However, it is great for later printing or for sharing project files with other designers.

    Vector formats

    EPS


    EPS - standard vector format files, consisting of numerous formulas and numbers, due to which a vector illustration is generated. This is an ideal format for those design elements that typically need to be scaled ( for example logos).

    Files in EPS format are ready for printing, however, this is not the format that should be used in web design. Often, once a page design is approved, its component elements are converted to PNG, JPG and GIF.

    Design elements saved in EPS format can be opened in any editor that supports vector graphics. Therefore, EPS is more suitable for sharing files with clients, printing on a printer, or for collaboration on a project with other designers.

    A.I.


    AI is another branded vector format from Adobe, designed to work in Illustrator program. An AI file cannot be embedded in web pages and is not the format used to send projects to a client. But it's good for internal use and for printing.

    Other formats

    PDF


    Adobe's PDF format is ideal for both print and digital use. This is a format that any client can “handle” and that can be printed on a printer without any problems. You can place both raster and vector images in a PDF document, or even combine them in a single document.

    Of course, you will have to try hard to display the contents of a PDF document on a website page in a high-quality manner, but you can download it. This format is also ideal for sending clients a preview of the final result.

    However, PDF is more suitable for printed products such as books, brochures or flyers.

    Converting different file types


    As you work on your print design, you may have to jump from one format to another. Sometimes you need to place JPG photos and an EPS logo into a common project, which is being worked on in a PSD file in Photoshop.

    The good thing is that every image format has strengths, and an experienced designer knows how to take advantage of them. There is a high chance that you will need the same design element in different formats: the main source of the logo will be stored in EPS format, its PNG version will be used on the site, and the animated GIF version will be reserved for special occasions.

    At Photoshop help and Illustrator, you can save and convert images to almost any format. But it is worth noting that saving a low-resolution image in a specific format will not help you improve its quality. But saving a high-quality image in a format using compression will lead to loss of quality.

    Convert vector image in raster is very simple - you need to specify the desired raster format when saving. However, this action will compress the vectors into pixels, which means that you will no longer be able to “painlessly” scale the saved image, so we recommend leaving a copy of the original file, just in case.

    Converting a raster image to a vector image is a whole science. There is no easy way to convert the pixels of a raster image into formulas that generate vectors. The most proven method is to simply redraw the picture using vectors.

    This publication is a translation of the article “ IMAGE FILE TYPES EXPLAINED: WHICH FORMAT SHOULD YOU USE?", prepared by the friendly project team

    Good Bad

    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 the majority graphic editors, including the fairly common 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 formats raster images provide high quality printing. 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 type of 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 shortcomings 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, and has a significant color scheme, 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!

    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 JPEG format, and then analyze PNG format, and we will 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 indicator does not exceed 256. In addition, 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 thereby 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 losing 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.