Photo Format related Concepts

Source: Internet
Author: User
Tags bmp image comparison table file size transparent color transparent image advantage

In general, there are two distinct types of image formats: lossy compression and lossless compression.

1. lossy compression
lossy compression reduces the amount of space the image occupies in memory and disk, and when viewed on the screen, it does not find that it has too much adverse effect on the appearance of the image. Because the human eye is more sensitive to light, the effect of light on the scene is more important than the color effect, which is the basic basis of lossy compression technology.

Lossy compression is characterized by a gradual change in color that removes abrupt changes in the color of the image. A large number of experiments in biology have shown that the human brain uses the closest color in the vicinity to fill the lost color. For example, for a white cloud on a blue sky background, the method of lossy compression is to remove some of the color portions of the edges of the scene in the image. When you look at the picture on the screen, the brain fills the missing color portion with the color seen on the scene. With lossy compression, some data is intentionally deleted, and canceled data is no longer restored.

Admittedly, the use of lossy compression technology can greatly compress the file data, but will affect the image quality. If the image that uses lossy compression is displayed only on the screen, it may not have much effect on the quality of the image, at least not in terms of the recognition level of the human eye. However, if an image processed by lossy compression is to be printed out with a high-resolution printer, there will be significant damage to the image quality.

2. Lossless compression

The basic principle of lossless compression is that the same color information is only saved once. The software that compresses the image first determines which areas of the image are the same and which are different. Images that include duplicate data (such as the Blue sky) can be compressed, and only the starting and ending points of the blue sky need to be recorded. But Blue may also have different shades, and the sky can sometimes be obscured by trees, peaks, or other objects, which need to be recorded separately. Essentially, lossless compression can remove some duplicate data, greatly reducing the size of the image to be saved on disk. However, the lossless compression method does not reduce the memory footprint of the image, because when the image is read from disk, the software fills in the missing pixels with the appropriate color information. If you want to reduce the amount of memory that an image consumes, you must use a lossy compression method.

The advantage of lossless compression method is that it can save the quality of image better, but the compression ratio of this method is relatively low. However, if you need to print the image with a high-resolution printer, it is best to use lossless compression almost all image files have their own simplified format name as the file extension. From the extension you can know what format the image is stored in, what software should be used to read/write, and so on.

There are several common picture formats:

One, photoshop format (pdf format)

Photoshop Format (pdf format) is a dedicated file format for Photoshop image processing software, with the file name extension. PSD, which is also the default format for new images in Photoshop. It is the only format that supports all available image modes (bitmap, grayscale, duotone, indexed color, RGB, CMYK, Lab, and multichannel) guides, alpha channels, spot channels, and layers (including adjustment layers, type layers, layer effects, and layer masks), which is a non-compressed original file Save format. PSD files can sometimes be very large, but because all the original information, in the image processing for the unfinished image, choose PSD format to save is the best choice.

When you're done with a photo, you can save all of the information for each layer, channel, mask, and so on, and it's handy to change a certain detail such as deleting a layer style, modifying an adjustment layer, or loading an alpha channel as a selection when you open it again. But general PSD format image file is large, not easy to transfer, so generally use this format to save as a backup of the works.

Second, jpg/jpeg format

The Joint Picture Expert Group (JPEG) format is a common format used on the World Wide Web and other online services to display photos and other continuous-tone images in Hypertext Markup Language (HTML) documents. The JPEG format supports RGB, CMYK, and grayscale color modes, but does not support alpha channels. Unlike the GIF format, JPEG retains all the color information in the image, but compresses the file size by selectively discarding the data. JPEG images are automatically uncompressed when they are opened. The higher the level of compression, the worse the image quality is, and the lower the compression level, the higher the quality of the image. In most cases, the "best" quality option results in almost no difference from the original image [4].
JPEG format is one of the most widely used image formats, it uses a special lossy compression algorithm, will not be easy to be detected by the human eye image color removed, so as to achieve a larger compression ratio (can reach 2:1 or even 40:1), so particularly favored by the network. Most of the digital photos uploaded by digital cameras, downloaded from the Internet, and scanned by photos are mostly JPEG formats.

Third, GIF format

The original meaning of GIF (Graphics Interchange Format) is "Image interchange formats", an image file format developed by CompuServe Company in 1987. GIF file data is a lossless compression format based on the LZW algorithm for continuous tones. Its compression rate is generally around 50%, it does not belong to any application. Almost all relevant software currently supports it, and the public domain has a large number of software used in GIF image files.

The data of the GIF image file is compressed, and it uses a compression algorithm such as variable length. So GIF image depth from lbit to 8bit, that is, GIF supports up to 256 colors of images. Another feature of the GIF format is that it can store multiple color images in a GIF file, which can form the simplest animation if multiple images stored in a file are read out and displayed on the screen.

GIF decoding is faster because it uses an interlaced GIF image to be scanned in four times when the edge is decoded. The first scan shows only one-eighth of the entire image, and the second scan shows only 1/4, but this shows the overall picture. When displaying a GIF image, an interlaced image gives you the impression that it appears to appear faster than other images, which is an advantage of interlaced storage.

GIF can do something that JPEG can't do. For example, you can interlace a GIF. Interlaced GIF graphics can be downloaded in a low definition and then slowly become clearer. In this way, the reader can quickly see what is a graph. JPEG is a smart line to download, until the full map downloaded, you can see the entire graph

Four, BMP format

BMP is a shorthand for the English bitmap (bitmap), which is the standard image file format in the Windows operating system, and all image processing software running in the Windows environment supports the BMP image file format. Each image-drawing operation within the Windows system is based on BMP. With the popularity of Windows operating systems and the development of rich Windows applications, BMP bitmap format is naturally widely used. This format is characterized by the richness of the information contained in the image, which is hardly compressed, but which leads to its innate disadvantage-taking up too much disk space. Therefore, the current BMP on a single machine is more popular. BMP bitmap File The default file name extension is BMP or BMP (sometimes it also has a. dib or. rle extension).

V. PNG format

PNG (Portable Network Graphics) is a new type of Web image format. At the end of 1994, due to the Unysis company's announcement that GIF had a patented compression method, the authors of the GIF software were required to pay a fee, thereby prompting the creation of a free PNG image format. PNG initially combines GIF and JPG two to replace both formats in one swoop. October 1, 1996 by PNG to the International Network Alliance proposed and received the recommended recognition standards, and most of the drawing software and browser began to support the PNG image browsing, from the PNG image format vitality.

PNG is currently guaranteed the most undistorted format, it draws the advantages of both GIF and JPG, the storage form is rich, both GIF and JPG color mode, another feature of the image files can be compressed to the limit to facilitate the network transmission, but also to retain all the image quality-related information, Because PNG uses lossless compression to reduce the size of a file, this is different from a JPG that sacrifices image quality in exchange for a high compression rate; The third feature is that the display is fast enough to display a low-resolution preview image with just 1/64 of the image information downloaded; PNG also supports transparent image production , transparent image in the production of Web page image is very useful, we can make the image background transparent, using the color information of the page itself instead of the color set to transparent, so that the image and the background of the Web page can be fused together harmoniously.
The disadvantage of PNG is that it does not support animation application, and if it can be enhanced in this way, it can completely replace GIF and JPEG. The default format for Macromedia Company's fireworks software is PNG. Now more and more software is starting to support this format, and it is becoming popular on the web.

Vi. swf Format

Using Flash we can create a suffix named swf (Shockwave format) animation, the format of the animated image can be used relatively small volume to express rich multimedia form. In the image transmission aspect, does not have to wait for the file all to download to watch, but can download the side to see, therefore is particularly suitable for the network transmission, especially in the case of poor transmission rate, but also can achieve better results. It is also proved that SWF has now been widely used in Web pages for multimedia presentations and interactive designs. In addition, the SWF animation is made from the vector technology, so no matter how many times the screen magnification, the screen will not have any damage. In summary, SWF format works with its high-definition picture quality and small volume, by more and more web designer's favor, but also more and more become the mainstream of web animation and web image design, has become the reality of online animation standards.

Comparison table of various picture formats

Jpg

Gif

Png

Bmp

Number of colors

Full colour

256

Full colour

Full colour

Compression mode

Lossy

Nondestructive

Nondestructive

No compression

Characteristics

Web page Common image format

Suitable for color-rich photos and landscapes, not suitable for graphics or text that represents many single color blocks

Transparent color processing is not supported

Web page Common image format

Supports Transparent color processing

Supports Transparent color processing

Compare new picture formats, some browsers do not support

Windows Original picture format


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.