亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

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

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
相關文章:
主站蜘蛛池模板: 99久热在线精品视频播 | 亚洲精品一区二区三区四区手机版 | 青木玲中文字幕一区二区 | 九九色在线视频 | 国产在线99 | 国产逼| 一级一级一片在线观看 | 国产一区中文字幕在线观看 | 亚洲欧美日韩国产专区一区 | 亚洲欧美成人影院 | 日韩一级a毛片欧美区 | 欧美三级观看 | 国产精品亚洲欧美日韩区 | 免费看爱爱视频 | 麻豆视频在线看 | 国产一级毛片午夜福 | wwwxxx亚洲| 特黄视频 | 国产精品日韩 | 国产精品免费播放 | 欧美成人免费草草影院视频 | 欧美日韩一区二区在线观看视频 | 曰本在线网 | 国产一区二区三区免费视频 | 手机国产日韩高清免费看片 | 91av官网| 国产精品国产三级在线高清观看 | 尤物视频免费在线观看 | 谁有免费黄色网址 | 久久精品国产69国产精品亚洲 | 成年人在线观看视频网站 | 国产男女野战视频在线看 | 可以免费观看一级毛片黄a 可以免费观看欧美一级毛片 | 国产成+人+综合+欧美 亚洲 | 日韩欧美一区二区三区 | yy6080韩国日本三理论 | 亚洲一级色 | 欧洲美女高清一级毛片 | 99久久精品国产综合一区 | 国产区精品高清在线观看 | 国产综合第一页在线视频 |