<?php require("PHP_Image_Class.php"); if($_GET["do"]=="Saving_Image"){// 保存图片 ################## /** * Dont forget that ImageTools save() function can called on every image action but it will needed to * be above the $im->destroy() function, even if you output image to the browser and saving it * concurrently, this serves also for $im->showImage() function */ // Saving image $img = new ImageTools("images/flower.jpg"); $img->save("/目录/目录/目录/目录/目录/PHP_Image_Class/", "myimage.jpg", 95, true); // path to save image, image name, image quality (if it is JPG format otherwise you can set this parameter 0), overwrite (or not) existing file (with the same name) $img->showImage(); // This image is saved on the disk but this function doesn‘t require disk reference (slower) it only references on memory (quicker) $img->destroy(); } ?>
用于处理图片的PHP类,可在图片上提供这些操作:
用法很简单,不需要插件,4-5行代码就能实现一个复杂的功能。 从而为PHP开发人员节约大量的开发时间。
而且安装简单,只需要把文件上传到服务器修改一下路径即可完成。