There are two ways to save the 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 the way they are displayed.
Baseline JPEG
This type of JPEG file is stored as a top-to-bottom scan, keeping each row sequentially in a JPEG file. When you open this file to display its contents, the data is displayed in the order in which it was stored, from top to bottom, 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 by a row of the effect, this format of JPEG has no merit, therefore, it is generally recommended to use progressive JPEG
Progressive JPEG
Unlike baseline scans, Progressive JPEG files contain multiple scans, which are stored in a JPEG file. In the process of opening a file, the blurred outline of the entire picture is displayed first, and as the number of scans increases, the picture becomes clearer. The main advantage of this format is that when the network is slow, you can see the outline of the picture knowing what the picture is about to be loaded. When you open larger pictures on some websites, you'll notice the technology.
If your internet speed and snail, you should be able to see the effect of, in fact, you in Qzone, Weibo and other large sites you will often see such effects.
PHP code can also be converted to progressive JPG.
Copy the Code code as follows:
<?php
$im = Imagecreatefromjpeg (' file.jpg ');
Set interlaced bit markers and the image is in JPEG format, the image is created as a progressive JPEG. PHP Manual
Imageinterlace ($im, 1);
Imagejpeg ($im, './outfile.jpg ', 80);
Imagedestroy ($im);
?>
How do I see whether the picture is progressive or baseline format?
I now know that using the ImageMagick software with the identity command to view the image resources
Copy the Code code as follows:
Identify-verbose outfile.jpg
If you see that there is a property for interlace:jpeg then it is the progressive picture.
http://www.bkjia.com/PHPjc/824749.html www.bkjia.com true http://www.bkjia.com/PHPjc/824749.html techarticle There are two ways to save the JPEG file format. They are baseline JPEG and progressive JPEG. Both formats have the same size and image data, their extensions are the same, the only difference ...