Not the best in the world, but should be good enough for a kickstart. Resizer("PHP-resize-b.png", "demoF.webp",, 70) įinally, this function is kind of a small convenience for you guys to use in your own projects – Basically, a “smart version” of the above examples that do checks and auto-dimension calculations. The first two arguments indicate the height and width of the cropped region, and the last two indicate the X and Y coordinates of the top-left corner. Resizer("PHP-resize-a.png", "demoE.jpg",, 60) The cropImage () method accepts four arguments. Resizer("PHP-resize-b.png", "demoD.png", 25) Resizer("PHP-resize-a.png", "demoC.jpg", 50) $fnOutput($resized, $destination, $quality) $resized = imagecreatetruecolor($new_width, $new_height) NB: You can probably strip out more - eg it sets the BG colour of the thumbnail so that it matches the page background. This uses the GD library in PHP and Ive always been happy with the results. In case I use it, I still get the blanc page. In our linux environment, using resizeImage with any filter produced extremely high CPU Utilization (in the range of 40-50) while doing batch resizing. $new_height = ceil(($size/100) * $height) Ive stripped out the bits that add drop shadows and borders (Dont think ive broken it but havent tested). The original command with the new options is: convert puma1.png -gravity center -background white -compress jpeg -resize 1755x2475 -extent 1755x2475 -units PixelsPerInch -density 150x150 puma1.pdf It seems the option -page A3 kills the output. Function resizer ($source, $destination, $size, $quality=null)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |