處理縮圖的PHP庫
<?php /** * PhpThumb Library Example File * This file contains example usage for the PHP Thumb Library * PHP Version 5 with GD 2.0+ * PhpThumb : PHP Thumb Library <http://phpthumb.gxdlabs.com> * Copyright (c) 2009, Ian Selby/Gen X Design * * Author(s): Ian Selby <ian@gen-x-design.com> * * Licensed under the MIT License * Redistributions of files must retain the above copyright notice. * * @author Ian Selby <ian@gen-x-design.com> * @copyright Copyright (c) 2009 Gen X Design * @link http://phpthumb.gxdlabs.com * @license http://www.opensource.org/licenses/mit-license.php The MIT License * @version 3.0 * @package PhpThumb * @subpackage Examples * @filesource */ require_once '../vendor/autoload.php'; $thumb = new PHPThumb\GD(__DIR__ .'/../tests/resources/test.jpg'); $thumb->adaptiveResize(175, 175); $thumb->show();
在用php開發網站的時候,使用物件導向的方法確實可以提高程式碼重複使用率,減少程式碼冗餘。而對初學者更友善的是,PHP開發網站所需的大部分類庫,網路上都有十分優秀的類庫存在了。這次帶給大家的就是處理縮圖的PHP類庫,需要的朋友可以直接拿去使用。
免責聲明
本站所有資源皆由網友貢獻或各大下載網站轉載。請自行檢查軟體的完整性!本站所有資源僅供學習參考。請不要將它們用於商業目的。否則,一切後果都由您負責!如有侵權,請聯絡我們刪除。聯絡方式:admin@php.cn
相關文章

21Oct2024
在 PHP 中使用 BigInteger 類別 PHP 提供了多種處理大整數值的方法。 BigInteger 類別就是這樣的選項之一。但是,您可以使用外部程式庫


Hot Tools

熱門文章
丟失記錄:Bloom&Rage -Corey和Dylan的鎖組合
19Feb2025手游攻略
王國來:拯救2-婚禮要買的衣服
05Feb2025手游攻略
王國來:拯救2-如何獲得Comfrey
07Feb2025手游攻略
Longvinter:完整的釣魚指南
21Feb2025手游攻略
Hello Kitty Island冒險:重新啟動機器人任務演練
16Feb2025手游攻略