There are two ways to save a JPEG file format. They are baseline JPEG and progressive JPEG.
Both formats have the same size and image data, and their extensions are the same, and the only difference is that they are displayed in a different way.
Baseline JPEG
This type of JPEG file is stored in a JPEG file in the order of each row, by scanning from top to bottom. When this file is opened to display its contents, the data is displayed from the top to the next line in the order in which it was stored, until all the data has been read and the entire picture is displayed. If the file is large or the network download speed is slow, then you will see the image is loaded with a row of rows, this format JPEG does not have any advantages, therefore, generally recommended to use progressive JPEG
Progressive JPEG
Unlike the baseline scan, the progressive JPEG file contains multiple scans, which are stored in a JPEG file. When you open a file, you will first show the blur outline of the entire picture, and as the number of scans increases, the picture becomes more and more clear. The main advantage of this format is that when the network is slow, you can see the outline of the picture to know what the picture is loading. You'll notice this technique when you open a larger picture on some Web sites.
If your speed and the same as the snail, you should be able to see the effect, in fact, you in Qzone, Weibo and other large sites you will often see this effect.
The PHP code can also convert it into a progressive jpg.
Copy Code code as follows:
<?php
$im = Imagecreatefromjpeg (' file.jpg ');
Set interlaced scanning to set the interleaved bit tag while the image uses the JPEG format, the image is created as progressive JPEG. PHP Manual
Imageinterlace ($im, 1);
Imagejpeg ($im, './outfile.jpg ', 80);
Imagedestroy ($im);
?>
How do I think the picture is progressive or baseline format?
I currently know that it is using the ImageMagick software with the identity command to view the image resources
Copy Code code as follows:
Identify-verbose outfile.jpg
If you see an attribute of Interlace:jpeg it is a progressive picture.