Copy CodeThe code is as follows:
Error_reporting (E_all);
Test
Imagezoom (' 1.jpg ', ' 2.jpg ', +, ' #FFFFFF ');
/*
PHP thumbnail functions:
Equal proportional lossless compression, can be filled with supplemental color Author: Andy
Hosting Format:
BMP, JPG, GIF, png
Param
@srcimage: Picture to zoom Out
@dstimage: the picture to save
@dst_width: Reduce the width
@dst_height: Reduce the high
@backgroundcolo
PHP thumbnails and Other proportional lossless compression, can fill the blank area to fill the color of the implementation code, you can refer to the need for friends.
PHP thumbnails and Other proportional lossless compression, can fill the blank area to fill the color of the implementation code, you can refer to the
Talking about how PHP solves the problem of lossless image compression,
This article describes how PHP solves the problem of Lossless Image Compression. The details are as follows:
The Code is as follows:
Header ("Content-type: image/jpeg"); $ file = "111.jpg"; $ percent = 1.5; // list of image
Copy codeThe Code is as follows:Error_reporting (E_ALL );// TestImagezoom('1.jpg ', '2.jpg', 400,300, '# ffff ');/*Php thumbnail function:Proportional lossless compression, can be filled with complementary colors author: huataiHost format:Bmp, jpg, gif, and pngParam:@ Srcimage: The image to be reduced@ Dstimage: The image to be saved@ Dst_width: narrowing down the width@ Dst_height: zoom in and out@ Backgro
Copy Code code as follows:
Error_reporting (E_all);
Test
Imagezoom (' 1.jpg ', ' 2.jpg ', ', ', ' #FFFFFF ');
/*
PHP thumbnail function:
Equal scale lossless compression, can fill supplementary color author: Andy
Hosting Format:
BMP, JPG, GIF, png
Param
@srcimage: Picture to shrink
@dstimage: Pictures to save
@dst_width: Narrow The width
@dst_height: Reduce the height
@backgroundcolor: Su
This article mainly introduced the PHP solves the picture lossless compression question, now shares to everybody, also gives everybody to make a reference.
The code is as follows:
Header ("Content-type:image/jpeg"); $file = "111.jpg"; $percent = 1.5; Picture compression ratio list ($width, $height) = getimagesize ($file); Get the original size//scale Size $neww
to JPEG.
pngquant --quality=65-80 image.png
--speed N,
-sN
Speed/quality trade-off from 1 (brute-force) to ten (fastest). The default is 3. Speed ten have 5% lower quality, but is 8 times faster than the default.
--iebug
Workaround for IE6, which only displays fully opaque pixels. Would make pngquant almost-opaque pixels fully opaque and would avoid creating new transparent colors.
└── [emailprotected] └── publish ├── css/ └── icon.sprite.css └── sprite/ ├── icon.png └── [emailprotected]css/icon.cssThe slice/ tiles under the call directory grunt-sprite will be css/icon.css processed.Generated in the publish/ directory css/ and sprite/ two directories, the css/ directory is the completion of the style of processing icon.sprite.css , and the sprite/ directory is the completion of the s
Copy codeThe Code is as follows: Error_reporting (E_ALL );
// Test
Imagezoom('1.jpg ', '2.jpg', 400,300, '# ffff ');
/*
Php thumbnail function:
Proportional lossless compression, can be filled with complementary colors author: huatai
Host format:
Bmp, jpg, gif, and png
Param:
@ Srcimage: The image to be reduced
@ Dstimage: The image to be saved
@ Dst_width: narrowing down the width
@ Dst_height: zoom in and
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.