Traditional Culture Encyclopedia - Photography major - What's the difference between bmp and JPG?

What's the difference between bmp and JPG?

The main differences between BMP and JPG are:

1, bmp saves the image by recording each pixel unit, which takes up a large memory space, but the image is not easily distorted.

2.jpg is a lossy compression format, which occupies a relatively small area. But if it is saved repeatedly, it will be compressed repeatedly, resulting in distortion.

BMP (Full Name Bitmap) is a standard image file format in Windows operating system, which is divided into two categories: device vector dependent bitmap (DDB) and device vector independent bitmap (DIB), and is widely used. It uses bitmap storage format and does not use any other compression except image depth, so BMP files take up a lot of space.

The image depth of BMP file can be selected as lbit, 4bit, 8bit and 24bit. When data is stored in a BMP file, images are scanned from left to right and from bottom to top. Because BMP file format is the standard for exchanging data related to drawings in Windows environment, all graphics and image software running in Windows environment supports BMP image format.

JPEG is the abbreviation of Joint Photographic Expert Group, and its file name is ".. jpg" or ". Jpeg ",which is the most commonly used image file format.

Developed by a software development association, it is a lossy compression format, which can compress images in a small storage space, and duplicate or unimportant data in images will be lost, which will easily cause damage to image data.

Especially, if the compression ratio is too high, the quality of the restored image after final decompression will obviously decrease. If you pursue high-quality images, you should not use too high compression ratio.

For example, a BMP bitmap file of 1.37Mb can be compressed to 20.3KB Of course, you can also find a balance between image quality and file size. JPEG format mainly compresses high-frequency information and preserves color information well. It is suitable for the Internet, can reduce the image transmission time, can support 24-bit true color, and is also widely used in images that need continuous tone.

Extended data:

BMP format combination

A typical BMP image file consists of four parts:

1: the data structure of bitmap header file, which contains information such as the type and display content of BMP image file;

2. Bitmap information data structure, including the width, height, compression mode and defined color of BMP image;

3: Palette, this part is optional, some bitmaps need a palette, and some bitmaps such as true color maps (24-bit BMP) don't need a palette;

4. Bitmap data. The content of this part varies according to the number of bits used in the BMP bitmap. RGB is directly used for 24-bit bitmaps, while other bitmaps smaller than 24 bits use the color index values in the palette.

JPG format type

As an upgraded version of JPEG, JPEG2000 has a compression ratio about 30% higher than that of JPEG, and supports both lossy and lossless compression. An extremely important feature of JPEG2000 format is that it can realize progressive transmission, that is, the outline of the image is transmitted first, and then the data is transmitted step by step, so as to continuously improve the image quality and make the image display from hazy to clear.

In addition, JPEG2000 also supports the so-called "region of interest" function, which can arbitrarily specify the compression quality of the region of interest on the image, or select the specified part to decompress first.

Compared with JPEG, JPEG2000 has obvious advantages and backward compatibility, so it can replace the traditional JPEG format. JPEG2000 can be applied to both traditional JPEG market, such as scanners and digital cameras, and emerging fields, such as network transmission and wireless communication.

References:

Baidu encyclopedia -—BMP

References:

Baidu encyclopedia -—JPEG