ImageMagick 相關

ImageMagick相關函數
FunctionDescription
圖片構造類image_handle = imagick_readimage([image file])讀取圖片到handle
 bool = imagick_writeimage([source image handle],[new name & filetype])寫圖片
 UN KNOW USE = imagick_writeimages 
 new_handle = imagick_clonehandle([image handle])複製出新句柄
 image_handle = imagick_image2blob([blob handle])將數據流數據轉換成爲image數據
 imagick_blob2image與image2blob相反
 image_handle = imagick_getcanvas([color],[canvas width],[canvas height])創建一個畫布
 UN KNOW USE = imagick_newimagelist 
錯誤句柄類bool = imagick_iserror([image handle])最後一次執行是否成功
 rason_string = imagick_failedreason([image handle])如果執行iImagick函數返回假將可以從本函數拋出失敗
 desc_string = imagick_faileddescription([image handle])顯示拋出的異常描述
 error_string = imagick_error([image handle])返回錯誤內容
獲取圖片信息類image_width = imagick_getwidth([image handle])獲得圖片寬度
 image_height = imagick_getheight([image handle])獲得圖片高度
 mime_string = imagick_getmimetype([image handle])獲得圖片MIME類型
 depth_int = imagick_getimagedepth([image handle])獲得圖片DEPTH值
 colors_num = imagick_getnumbercolors([image handle])獲得圖片顏色數量
 bool = imagick_isgrayimage([image handle])是否會度圖片
 bool = imagick_ismonochromeimage([image handle])是否單色圖片
 bool = imagick_isopaqueimage([image handle])是否不透明圖片
 bool = imagick_ispaletteimage([image handle])是否彩色圖片
 image_type = imagick_getimagetype([image handle])獲得圖片顏色值
 bool = imagick_isimagesequal([image handle1],([image handle2]))圖片是否相同
 magick_type = imagick_getmagick([image handle])獲得圖片類型
 int = imagick_getcolorspace([image handle]) 
圖片轉換類bool = imagick_convert([image handle],[new type])將圖片數據轉換成爲指定格式
 bool = imagick_setcompressiontype([image handle],[compression type])指定圖片的壓縮方式
 bool = imagick_setcompressionquality([image handle],[quality value])指定圖片的壓縮質量
尺寸調整類bool = imagick_resize([image handle],[new width],[new height],[filter type],[blur],[geometry])改變圖片尺寸
 UN KNOW USE imagick_magnify 
 UN KNOW USE imagick_minify 
 bool = imagick_scale([image handle],[new width],[new height],[geometry])按照指定比例縮小圖片
 bool = imagick_sample([image handle],[new width],[new height],[geometry])縮小產生樣本圖片
 bool = imagick_zoom([image handle],[new width],[new height],[geometry])放大圖片
字體設置類bool = imagick_setfontsize([image handle],[size])設置字體大小
 UN KNOW USE imagick_setfontstyle 
 bool = imagick_setfontface([image handle],[Font Name])設置採用的字體
繪圖類bool = imagick_begindraw([image handle])開始在一個image上繪畫
 bool = imagick_drawannotation([image handle],[x],[y],[text])在image上的x y開始畫一些文字符號
 bool = imagick_drawrectangle([image handle],[up x],[up y],[low x],[low y])畫一個矩形
 bool = imagick_drawellipse([image handle],[starting x],[starting y],[ending x],[ending y],[start rotation in degrees],[end rotation in degrees])畫一個橢圓形
 bool = imagick_drawarc([image handle],[origin x],[origin y],[ x radius],[ y radius],[ start rotation in degrees],[ end rotation in degrees])畫一個弧形
 bool = imagick_drawcircle([image handle],[origin x],[origin y],[perimater x],[perimater y])畫一個圓
 bool = imagick_drawline([image handle],[starting x],[starting y],[ending x],[ending y])畫一條線
 bool = imagick_drawpoint([image handle],[xcoordinate ],[y coordinate ])畫一個點
 bool = imagick_setfillcolor([image handle],[color vlaue])設置填充顏色
 bool = imagick_setfillopacity([image handle],[opactiy])設置不透明度
質量增強類bool = imagick_rotate([image handle],[degrees])設置旋轉圖片的角度
 bool = imagick_shear([image handle],[x coordinate],[y coordinate])旋轉剪切
 bool = imagick_contrast([image handle],[contrast value])提高或降低圖象對比度
 bool = imagick_equalize([image handle])色彩均勻化
 bool = imagick_gamma([image handle],[gamma value 0.8 - 2.3])圖象GAMMA調整
 bool = imagick_level([image handle],[gamma value 0.8 - 2.3])圖象GAMMA調整
 bool = imagick_modulate([image handle],[modulate])調整亮度,飽和度,色彩
 bool = imagick_negate([image handle],[gray scale value])反色圖片
 bool = imagick_normalize([image handle])規格化圖片
圖片裝飾類bool = imagick_border([image handle],[ x starting position of border ],[y starting position of border ],[width of border],[height of border])在圖片上化一個邊框
 UN KNOW USE imagick_frame 
 bool = imagick_raise([image handle],[ x starting position of border ],[ y starting position of border ],[width of border],[ height of border],[raise non-zero])浮雕效果
效率濾鏡類bool = imagick_charcoal([image handle],[the radius of pixel neighborhood],[the standard deviation of the Gaussian, in pixels])碳筆
 bool = imagick_implode([image handle],[define the extent of the implosion])內曝效果
 bool = imagick_oilpaint([image handle],[the radius of the circular 
neighborhood])
油畫效果
 bool = imagick_solarize([image handle],[define the extent of solarization - this value is between 0 and MaxRGB])反轉曝光
 bool = imagick_swirl([image handle],[define the tightness of the swirling 
effect ])
旋渦
 bool = imagick_wave([image handle],[the amplitude of the wave],[the frequency of the wave])水波紋
圖片濾鏡類bool = imagick_blur([image handle],[the radius of the Gaussian, in 
pixels, not counter the center pixel],[the standard deviation of the 
Gaussian, in pixels])
模糊
 bool = imagick_despeckle([image handle])平滑聚焦圖象
 bool = imagick_edge([image handle],[the radius of the pixel neighbor- hood; using 0 will cause a suitable radius to be selected for you])邊緣銳化
 bool = imagick_emboss([image handle],[the radius of the pixel neighbor- 
hood],[the standard deviation of the Gaussian, in pixels])
浮雕效果
 bool = imagick_enhance([image handle])圖象增強
 bool = imagick_gaussianblur([image handle],[he radius of the Gaussian, in pixels, not counting the center pixel; using 0 will cause a suitable radius to be selected for you],[the standard deviation of the Gaussian, in pixels])高斯模糊
 bool = imagick_medianfilter([image handle],[the radius of the pixel neighbor-hood])平滑過濾圖象
 bool = imagick_motionblur([image handle],[the radius of the Gaussian, in 
pixels, not counter the center pixel],[the standard deviation of the 
Gaussian, in pixels],[apply the effect along this angle])
動感模糊
 bool = imagick_reducenoise([image handle],[the radius of the pixel neighborhood])降噪
 bool = imagick_shade陰影
 bool = imagick_sharpen銳化
 bool = imagick_spread發散
 bool = imagick_threshold臨界值
 bool = imagick_unsharpmaskunsharpmask銳化
 UN KNOW USE bool = imagick_flatten 
圖片列表類bool = imagick_next 
 bool = imagick_prev 
 bool = imagick_first 
 bool = imagick_goto 
 bool = imagick_getlistsize 
 bool = imagick_getlistindex 
 bool = imagick_getimagefromlist 
 bool = imagick_pushlist 
 bool = imagick_poplist 
圖片變形類bool = imagick_chop 
 bool = imagick_crop([image handle],[x starting position of border],[y starting position of border],[width of border],[height of border])從圖片上截取
 bool = imagick_flip ([image handle])圖象翻轉
 bool = imagick_flop左右轉換
 bool = imagick_roll 
 bool = imagick_profile 
 bool = imagick_rgbtransform色彩變更
 bool = imagick_transformrgb色彩變更
 bool = imagick_mosaic 
 bool = imagick_transparent([image handle],[color value])設置指定顏色成爲透明色
圖片量子化bool = imagick_ordereddither([image handle]) 
圖片合成類bool = imagick_composite圖象融合
圖片屬性設置bool = imagick_set_image_comment([image handle],[the comment to set in the image])設置圖象的一些參數
 bool = imagick_set_image_quality([image handle],[quality value])設置圖象的質量
句柄銷燬類bool = imagick_destroyhandle([image handle])幹掉指定的image handle
兼容的函數imagick_read => imagick_readimage 
 imagick_free => imagick_destroyhandle 
拋棄的函數imagick_add_resource 
 imagick_list_magickinfo 
 imagick_new 
 imagick_init 
 imagick_copy_sample 
 imagick_copy_resize 
 imagick_copy_crop 
 imagick_copy_shear 
 imagick_copy_rotate 
 imagick_copy_morph 
 imagick_dump

圖片的二進制初始化ImageMagick


  1.  std::vector<char> buf;  //這個存儲了當前gif圖片的內容信息  
  2. char* blobData = new char[buf.size()];  
  3. for ( int i = 0; i < buf.size(); i++ )  
  4.     blobData[i] = buf[i];  
  5. size_t blobLen =  buf.size();  
  6.   
  7. // Construct Magick++ Blob  
  8. Magick::Blob blob(static_cast<const void*>(blobData), blobLen);  
  9.   
  10. std::vector<Magick::Image> image_list;  
  11. Magick::readImages( &image_list, blob );  
官方demo
ftp://ftp.mpe.mpg.de/pub/ImageMagick/ImageMagick-5.3.3/Magick++/tests/readWriteBlob.cpp
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章