成人精品一区二区三区中文字幕-成人精品一区二区三区-成人精品一级毛片-成人精品亚洲-日本在线视频一区二区-日本在线视频免费

導航首頁 ? 技術教程 ? PHP:imagecreatefromgd2part()的用法_GD庫圖像處理函數
全站頭部文字 我要出現在這里
PHP:imagecreatefromgd2part()的用法_GD庫圖像處理函數 772 2023-12-15   

imagecreatefromgd2part

(PHP 4 >= 4.0.7, PHP 5)

imagecreatefromgd2part — 從給定的 GD2 文件或 URL 中的部分新建一圖像

說明

resource imagecreatefromgd2part ( string $filename , int $srcX , int $srcY , int $width , int $height )

Create a new image from a given part of GD2 file or URL.

Tip

如已啟用fopen 包裝器,在此函數中, URL 可作為文件名。關于如何指定文件名詳見 fopen()。各種 wapper 的不同功能請參見 支持的協議和封裝協議,注意其用法及其可提供的預定義變量。

參數

filename

Path to the GD2 image.

srcX

x-coordinate of source point.

srcY

y-coordinate of source point.

width

源圖象的寬度。

height

源圖象的高度。

返回值

成功后返回圖象資源,失敗后返回 FALSE

范例

Example #1 imagecreatefromgd2part() example

<?php
// For this example we need the image size before
$image = getimagesize('./test.gd2');

// Create the image instance now we got the image 
// sizes
$im = imagecreatefromgd2part('./test.gd2', 4, 4, ($image[0] / 2) - 6, ($image[1] / 2) - 6);

// Do an image operation, in this case we emboss the 
// image if PHP 5+
if(function_exists('imagefilter'))
{
    imagefilter($im, IMG_FILTER_EMBOSS);
}

// Save optimized image
imagegd2($im, './test_emboss.gd2');
imagedestroy($im);
?>

注釋

Note: 此函數需要 GD 2.0.1 或更高版本(推薦 2.0.28 及更高版本)。

Warning

Windows 版本的 PHP 在 4.3.0 版之前不支持通過此函數訪問遠程文件,即使已經啟用 allow_url_fopen.


主站蜘蛛池模板: 汤姆·塞兹摩尔| 贪玩的小水滴300字| 远景山谷1981免费版| 做菜的视频家常菜大全| 免费身份证图片| 张天爱惊艳写真照| 无线新闻| 铃木纱理奈| 地下车库设计规范| 寡妇高潮一级免费看| stevenson| 美丽女波士1983| 《杨贵妃淫史》三级| 《爱你》演员表| 邓伦是石家庄哪里的| 赵凯的个人资料| 双重欲望| 日本大片ppt免费ppt视频| 男吸女人奶水视频免费观看| 洗鼻器的使用方法教程| 青草国产| 美娜个人资料简介| 茶馆剧本完整版| 冬去春来电视剧| 读书很苦,坚持很酷| 搜狐视频官网| 汪始慧| 送教上门工作情况记录表| 女八路被鬼子抓了受刑| 一年级英语书| 常乐镇| 青春之放纵作文免费阅读| 黎姿电影| 四月一日| 爱你电视剧演员表| 色戒在线观看汤唯| 何育骏| 皮肤诊所| 个体工商户起名字大全免费| 宙斯的12个儿子都是谁| 少女免费观看完整电视电影|

!!!站長長期在線接!!!

網站、小程序:定制開發/二次開發/仿制開發等

各種疑難雜癥解決/定制接口/定制采集等

站長微信:lxwl520520

站長QQ:1737366103