电脑知识|欧美黑人一区二区三区|软件|欧美黑人一级爽快片淫片高清|系统|欧美黑人狂野猛交老妇|数据库|服务器|编程开发|网络运营|知识问答|技术教程文章 - 好吧啦网

您的位置:首頁技術文章
文章詳情頁

PHP擴展之圖像處理2——Gmagick庫使用示例及相關類和函數

瀏覽:2日期:2022-09-15 17:13:36
使用示例

<?php//初始化一個新的Gmagick對象$image?=?new?Gmagick(’example.jpg’);//通過加載的圖片生成縮略圖(保持縱橫比).?$image->thumbnailImage(100,?0);//創建圖片的邊框,?然后模擬圖像使其看上去像一幅油畫$image->borderImage('yellow',?8,?8)->oilPaintImage(0.3);//將當前圖片寫入到一個文件$image->write(’example_thumbnail.jpg’);?>相關和類函數

1.Gmagick類

Gmagick::addimage?— 添加一張新的圖片到 Gmagick 對象圖片列表Gmagick::addnoiseimage?— 添加隨機噪聲到圖片Gmagick::annotateimage?— 為圖片添加文字注釋Gmagick::blurimage?— 為圖像添加模糊濾鏡效果Gmagick::borderimage?— 在圖像四周添加邊框Gmagick::charcoalimage?— 模擬素描Gmagick::chopimage?— 從圖像中移除一塊區域Gmagick::clear?— 清除與Gmagick對象相關的所有資源Gmagick::commentimage?— 添加注釋到圖像Gmagick::compositeimage?— 合成一個圖像到另一個圖像Gmagick::__construct?— Gmagick構造器Gmagick::cropimage?— 裁剪獲取圖片指定區域Gmagick::cropthumbnailimage?— 先縮放再裁剪從而創建一個指定尺寸的縮略圖Gmagick::current?— 當前目標Gmagick::cyclecolormapimage?— Displaces an image’s colormapGmagick::deconstructimages?— Returns certain pixel differences between imagesGmagick::despeckleimage?— The despeckleimage purposeGmagick::destroy?— 銷毀Gmagick對象,釋放內存空間Gmagick::drawimage?— Renders the GmagickDraw object on the current imageGmagick::edgeimage?— Enhance edges within the imageGmagick::embossimage?— Returns a grayscale image with a three-dimensional effectGmagick::enhanceimage?— Improves the quality of a noisy imageGmagick::equalizeimage?— Equalizes the image histogramGmagick::flipimage?— Creates a vertical mirror imageGmagick::flopimage?— The flopimage purposeGmagick::frameimage?— Adds a simulated three-dimensional borderGmagick::gammaimage?— Gamma-corrects an imageGmagick::getcopyright?— Returns the GraphicsMagick API copyright as a stringGmagick::getfilename?— The filename associated with an image sequenceGmagick::getimagebackgroundcolor?— Returns the image background colorGmagick::getimageblueprimary?— Returns the chromaticy blue primary pointGmagick::getimagebordercolor?— Returns the image border colorGmagick::getimagechanneldepth?— Gets the depth for a particular image channelGmagick::getimagecolors?— Returns the color of the specified colormap indexGmagick::getimagecolorspace?— Gets the image colorspaceGmagick::getimagecompose?— Returns the composite operator associated with the imageGmagick::getimagedelay?— Gets the image delayGmagick::getimagedepth?— Gets the depth of the imageGmagick::getimagedispose?— Gets the image disposal methodGmagick::getimageextrema?— Gets the extrema for the imageGmagick::getimagefilename?— Returns the filename of a particular image in a sequenceGmagick::getimageformat?— Returns the format of a particular image in a sequenceGmagick::getimagegamma?— Gets the image gammaGmagick::getimagegreenprimary?— Returns the chromaticy green primary pointGmagick::getimageheight?— 返回圖像高度Gmagick::getimagehistogram?— Gets the image histogramGmagick::getimageindex?— Gets the index of the current active imageGmagick::getimageinterlacescheme?— Gets the image interlace schemeGmagick::getimageiterations?— Gets the image iterationsGmagick::getimagematte?— Return if the image has a matte channelGmagick::getimagemattecolor?— Returns the image matte colorGmagick::getimageprofile?— Returns the named image profile.Gmagick::getimageredprimary?— Returns the chromaticity red primary pointGmagick::getimagerenderingintent?— Gets the image rendering intentGmagick::getimageresolution?— Gets the image X and Y resolutionGmagick::getimagescene?— Gets the image sceneGmagick::getimagesignature?— Generates an SHA-256 message digestGmagick::getimagetype?— Gets the potential image type.Gmagick::getimageunits?— Gets the image units of resolutionGmagick::getimagewhitepoint?— Returns the chromaticity white pointGmagick::getimagewidth?— 返回圖像寬度Gmagick::getpackagename?— Returns the GraphicsMagick package name.Gmagick::getquantumdepth?— Returns the Gmagick quantum depth as a string.Gmagick::getreleasedate?— Returns the GraphicsMagick release date as a string.Gmagick::getsamplingfactors?— Gets the horizontal and vertical sampling factor.Gmagick::getsize?— 返回與當前gmagick對象相關聯的尺寸Gmagick::getversion?— 返回當前GraphicsMagick API的版本Gmagick::hasnextimage?— 檢查對象是否包含更多圖像Gmagick::haspreviousimage?— Checks if the object has a previous imageGmagick::implodeimage?— Creates a new image as a copyGmagick::labelimage?— Adds a label to an image.Gmagick::levelimage?— Adjusts the levels of an imageGmagick::magnifyimage?— Scales an image proportionally 2xGmagick::mapimage?— Replaces the colors of an image with the closest color from a reference image.Gmagick::medianfilterimage?— Applies a digital filterGmagick::minifyimage?— Scales an image proportionally to half its sizeGmagick::modulateimage?— Control the brightness, saturation, and hueGmagick::motionblurimage?— Simulates motion blurGmagick::newimage?— 創建一個新的圖像Gmagick::nextimage?— 移動到下一張圖片Gmagick::normalizeimage?— Enhances the contrast of a color imageGmagick::oilpaintimage?— 模擬油畫效果(使用示例:本篇文章開頭的示例代碼)Gmagick::previousimage?— Move to the previous image in the objectGmagick::profileimage?— Adds or removes a profile from an imageGmagick::quantizeimage?— Analyzes the colors within a reference imageGmagick::quantizeimages?— The quantizeimages purposeGmagick::queryfontmetrics?— Returns an array representing the font metricsGmagick::queryfonts?— Returns the configured fontsGmagick::queryformats?— Returns formats supported by Gmagick.Gmagick::radialblurimage?— Radial blurs an imageGmagick::raiseimage?— Creates a simulated 3d button-like effectGmagick::read?— 從文件名中讀取圖像Gmagick::readimage?— 從文件名中讀取圖像Gmagick::readimageblob?— Reads image from a binary stringGmagick::readimagefile?— The readimagefile purposeGmagick::reducenoiseimage?— Smooths the contours of an imageGmagick::removeimage?— Removes an image from the image listGmagick::removeimageprofile?— Removes the named image profile and returns itGmagick::resampleimage?— Resample image to desired resolutionGmagick::resizeimage?— 調整圖像尺寸Gmagick::rollimage?— 偏移圖像Gmagick::rotateimage?— 旋轉圖片Gmagick::scaleimage?— 調整圖片大小Gmagick::separateimagechannel?— Separates a channel from the imageGmagick::setfilename?— 在讀取或者寫入圖片之前設置文件名Gmagick::setimagebackgroundcolor?— 設置圖像背景色Gmagick::setimageblueprimary?— Sets the image chromaticity blue primary point.Gmagick::setimagebordercolor?— 設置圖像邊框顏色.Gmagick::setimagechanneldepth?— Sets the depth of a particular image channelGmagick::setimagecolorspace?— Sets the image colorspaceGmagick::setimagecompose?— Sets the image composite operatorGmagick::setimagedelay?— Sets the image delayGmagick::setimagedepth?— Sets the image depthGmagick::setimagedispose?— Sets the image disposal methodGmagick::setimagefilename?— 在一個序列中設置特定圖片的文件名Gmagick::setimageformat?— Sets the format of a particular imageGmagick::setimagegamma?— Sets the image gammaGmagick::setimagegreenprimary?— TSets the image chromaticity green primary point.Gmagick::setimageindex?— Set the iterator to the position in the image list specified with the index parameterGmagick::setimageinterlacescheme?— Sets the interlace scheme of the image.Gmagick::setimageiterations?— Sets the image iterations.Gmagick::setimageprofile?— Adds a named profile to the Gmagick objectGmagick::setimageredprimary?— Sets the image chromaticity red primary point.Gmagick::setimagerenderingintent?— Sets the image rendering intentGmagick::setimageresolution?— Sets the image resolutionGmagick::setimagescene?— 設置圖片場景Gmagick::setimagetype?— 設置圖片類型Gmagick::setimageunits?— Sets the image units of resolution.Gmagick::setimagewhitepoint?— Sets the image chromaticity white point.Gmagick::setsamplingfactors?— Sets the image sampling factors.Gmagick::setsize?— Sets the size of the Gmagick objectGmagick::shearimage?— Creating a parallelogramGmagick::solarizeimage?— Applies a solarizing effect to the imageGmagick::spreadimage?— Randomly displaces each pixel in a blockGmagick::stripimage?— Strips an image of all profiles and commentsGmagick::swirlimage?— Swirls the pixels about the center of the imageGmagick::thumbnailimage?— Changes the size of an imageGmagick::trimimage?— Remove edges from the imageGmagick::write?— 將圖片寫入到指定文件名,如果文件名為空,則圖片寫入到Gmagick::ReadImage()或者Gmagick::SetImageFilename()設置的文件名中。Gmagick::writeimage?— 將圖片寫入指定文件名,與Gmagick::write的區別在于writeimage函數包含一個可選的布爾參數all_frames。

2.GmagickDraw 類

GmagickDraw::annotate?— Draws text on the imageGmagickDraw::arc?— Draws an arcGmagickDraw::bezier?— Draws a bezier curveGmagickDraw::ellipse?— Draws an ellipse on the imageGmagickDraw::getfillcolor?— Returns the fill colorGmagickDraw::getfillopacity?— Returns the opacity used when drawingGmagickDraw::getfont?— Returns the fontGmagickDraw::getfontsize?— Returns the font pointsizeGmagickDraw::getfontstyle?— Returns the font styleGmagickDraw::getfontweight?— Returns the font weightGmagickDraw::getstrokecolor?— Returns the color used for stroking object outlinesGmagickDraw::getstrokeopacity?— Returns the opacity of stroked object outlinesGmagickDraw::getstrokewidth?— Returns the width of the stroke used to draw object outlinesGmagickDraw::gettextdecoration?— Returns the text decorationGmagickDraw::gettextencoding?— Returns the code set used for text annotationsGmagickDraw::line?— The line purposeGmagickDraw::point?— Draws a pointGmagickDraw::polygon?— Draws a polygonGmagickDraw::polyline?— Draws a polylineGmagickDraw::rectangle?— Draws a rectangleGmagickDraw::rotate?— Applies the specified rotation to the current coordinate spaceGmagickDraw::roundrectangle?— Draws a rounded rectangleGmagickDraw::scale?— Adjusts the scaling factorGmagickDraw::setfillcolor?— Sets the fill color to be used for drawing filled objects.GmagickDraw::setfillopacity?— The setfillopacity purposeGmagickDraw::setfont?— Sets the fully-specified font to use when annotating with text.GmagickDraw::setfontsize?— Sets the font pointsize to use when annotating with text.GmagickDraw::setfontstyle?— Sets the font style to use when annotating with textGmagickDraw::setfontweight?— Sets the font weightGmagickDraw::setstrokecolor?— Sets the color used for stroking object outlines.GmagickDraw::setstrokeopacity?— Specifies the opacity of stroked object outlines.GmagickDraw::setstrokewidth?— Sets the width of the stroke used to draw object outlines.GmagickDraw::settextdecoration?— Specifies a decorationGmagickDraw::settextencoding?— Specifies specifies the text code set

3.GmagickPixel 類

GmagickPixel::__construct?— The GmagickPixel constructorGmagickPixel::getcolor?— Returns the colorGmagickPixel::getcolorcount?— Returns the color count associated with this colorGmagickPixel::getcolorvalue?— Gets the normalized value of the provided color channelGmagickPixel::setcolor?— Sets the colorGmagickPixel::setcolorvalue?— Sets the normalized value of one of the channels
標簽: PHP
相關文章:
主站蜘蛛池模板: 空压机商城|空气压缩机|空压机配件-压缩机网旗下商城 | 自进式锚杆-自钻式中空注浆锚杆-洛阳恒诺锚固锚杆生产厂家 | Type-c防水母座|贴片母座|耳机接口|Type-c插座-深圳市步步精科技有限公司 | MVR蒸发器厂家-多效蒸发器-工业废水蒸发器厂家-康景辉集团官网 | 爱佩恒温恒湿测试箱|高低温实验箱|高低温冲击试验箱|冷热冲击试验箱-您身边的模拟环境试验设备技术专家-合作热线:400-6727-800-广东爱佩试验设备有限公司 | ptc_浴霸_大巴_干衣机_呼吸机_毛巾架_电动车加热器-上海帕克 | 冷镦机-多工位冷镦机-高速冷镦机厂家-温州金诺机械设备制造有限公司 | 钛合金标准件-钛合金螺丝-钛管件-钛合金棒-钛合金板-钛合金锻件-宝鸡远航钛业有限公司 | 气密性检测仪_气密性检测设备_防水测试仪_密封测试仪-岳信仪器 | 小型气象站_便携式自动气象站_校园气象站-竞道气象设备网 | 【灵硕展览集团】展台展会设计_展览会展台搭建_展览展示设计一站式服务公司 | 上海阳光泵业制造有限公司 -【官方网站】 | 蓝莓施肥机,智能施肥机,自动施肥机,水肥一体化项目,水肥一体机厂家,小型施肥机,圣大节水,滴灌施工方案,山东圣大节水科技有限公司官网17864474793 | LED太阳能中国结|发光红灯笼|灯杆造型灯|节日灯|太阳能灯笼|LED路灯杆装饰造型灯-北京中海轩光电 | 顺辉瓷砖-大国品牌-中国顺辉 | 骨密度检测仪_骨密度分析仪_骨密度仪_动脉硬化检测仪专业生产厂家【品源医疗】 | 杭州高温泵_热水泵_高温油泵|昆山奥兰克泵业制造有限公司 | 青岛代理记账_青岛李沧代理记账公司_青岛崂山代理记账一个月多少钱_青岛德辉财税事务所官网 | 无线讲解器-导游讲解器-自助讲解器-分区讲解系统 品牌生产厂家[鹰米讲解-合肥市徽马信息科技有限公司] | 篮球地板厂家_舞台木地板品牌_体育运动地板厂家_凯洁地板 | 山东led显示屏,山东led全彩显示屏,山东LED小间距屏,临沂全彩电子屏-山东亚泰视讯传媒有限公司 | 防勒索软件_数据防泄密_Trellix(原McAfee)核心代理商_Trellix(原Fireeye)售后-广州文智信息科技有限公司 | 科箭WMS仓库管理软件-TMS物流管理系统-科箭SaaS云服务 | PVC地板|PVC塑胶地板|PVC地板厂家|地板胶|防静电地板-无锡腾方装饰材料有限公司-咨询热线:4008-798-128 | 外观设计_设备外观设计_外观设计公司_产品外观设计_机械设备外观设计_东莞工业设计公司-意品深蓝 | 定制奶茶纸杯_定制豆浆杯_广东纸杯厂_[绿保佳]一家专业生产纸杯碗的厂家 | 扫地车厂家-山西洗地机-太原电动扫地车「大同朔州吕梁晋中忻州长治晋城洗地机」山西锦力环保科技有限公司 | 微学堂-电动能源汽车评测_电动车性能分享网 | 合肥钣金加工-安徽激光切割加工-机箱机柜加工厂家-合肥通快 | 纯化水设备-纯水设备-超纯水设备-[大鹏水处理]纯水设备一站式服务商-东莞市大鹏水处理科技有限公司 | 灌木树苗-绿化苗木-常绿乔木-价格/批发/基地 - 四川成都途美园林 | 阴离子聚丙烯酰胺价格_PAM_高分子聚丙烯酰胺厂家-河南泰航净水材料有限公司 | 耳模扫描仪-定制耳机设计软件-DLP打印机-asiga打印机-fitshape「飞特西普」 | 查分易-成绩发送平台官网 | 质检报告_CE认证_FCC认证_SRRC认证_PSE认证_第三方检测机构-深圳市环测威检测技术有限公司 | 北京康百特科技有限公司-分子蒸馏-短程分子蒸馏设备-实验室分子蒸馏设备 | 食品无尘净化车间,食品罐装净化车间,净化车间配套风淋室-青岛旭恒洁净技术有限公司 | 防潮防水通风密闭门源头实力厂家 - 北京酷思帝克门窗 | 派克防爆伺服电机品牌|国产防爆伺服电机|高低温伺服电机|杭州摩森机电科技有限公司 | 专业深孔加工_东莞深孔钻加工_东莞深孔钻_东莞深孔加工_模具深孔钻加工厂-东莞市超耀实业有限公司 | 北京乾茂兴业科技发展有限公司|