處理縮圖的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 類別就是這樣的選項之一。但是,您可以使用外部程式庫


熱工具

熱門文章
兩個點博物館:邦格荒地地點指南
28Feb2025手游攻略
擊敗分裂小說需要多長時間?
07Mar2025手游攻略
在哪裡可以在怪物獵人荒野中找到地球晶體
27Feb2025手游攻略
倉庫:如何復興隊友
04Mar2025手游攻略
Hello Kitty Island冒險:如何獲得巨型種子
05Mar2025手游攻略