'ImagickException','NoDecodeDelegateForThisImageFormat`TMP'@ error / constitute.c / ReadImage / 501'

时间:2019-06-05 19:45:27

标签: php imagick

我尝试安装magick,并且可以工作,但是当我需要使用PDF文件时,会出错。

我使用xampp

  • php 5.6
  • 编译器MSVC11(Visual C ++ 2012)
  • 建筑x86
  • 启用线程安全
  • 64位系统
  • windows Server 2012 R2

bin / dlls:

  • php_imagick-3.1.2-5.6-ts-vc11-x86
  • ImageMagick-6.9.3-7-vc11-x86

我尝试安装ghostpcl-9.27-win32。

版本:

  • ImageMagick 7.0.8-48 Q16 x86 2019-06-01

    $im = new Imagick();
    $im->setResolution(300,300);
    $im->readimage($pdf->tmp_name);
    $im->setImageFormat('jpeg');     
    $im->cropImage(500, 500, 50, 1420);
    $im->writeImage($pdf->tmp_name . '.jpg'); 
    $im->clear(); 
    $im->destroy();
    

致命错误:带有消息'NoDecodeDelegateForThisImageFormat'TMP'@ error / constitute.c / ReadImage / 501'的C:\ xampp \ htdocs \ adm_engemed_ts5 \ eol \ scr \ savePDF.php:60堆栈跟踪未捕获的异常'ImagickException' :#0 C:\ xampp \ htdocs \ adm_engemed_ts5 \ eol \ scr \ savePDF.php(60):imagick-> readimage('C:\ xampp \ tmp \ ph ...')#1 {main}抛出C :第60行的\ xampp \ htdocs \ adm_engemed_ts5 \ eol \ scr \ savePDF.php

$im->queryFormats();

当我使用时:

array(234) {
  [0]=>
  string(3) "3FR"
  [1]=>
  string(3) "AAI"
  [2]=>
  string(2) "AI"
  [3]=>
  string(3) "ART"
  [4]=>
  string(3) "ARW"
  [5]=>
  string(3) "AVI"
  [6]=>
  string(3) "AVS"
  [7]=>
  string(3) "BGR"
  [8]=>
  string(4) "BGRA"
  [9]=>
  string(4) "BGRO"
  [10]=>
  string(3) "BIE"
  [11]=>
  string(3) "BMP"
  [12]=>
  string(4) "BMP2"
  [13]=>
  string(4) "BMP3"
  [14]=>
  string(3) "BRF"
  [15]=>
  string(3) "CAL"
  [16]=>
  string(4) "CALS"
  [17]=>
  string(6) "CANVAS"
  [18]=>
  string(7) "CAPTION"
  [19]=>
  string(3) "CIN"
  [20]=>
  string(3) "CIP"
  [21]=>
  string(4) "CLIP"
  [22]=>
  string(9) "CLIPBOARD"
  [23]=>
  string(4) "CMYK"
  [24]=>
  string(5) "CMYKA"
  [25]=>
  string(3) "CR2"
  [26]=>
  string(3) "CRW"
  [27]=>
  string(3) "CUR"
  [28]=>
  string(3) "CUT"
  [29]=>
  string(4) "DATA"
  [30]=>
  string(3) "DCM"
  [31]=>
  string(3) "DCR"
  [32]=>
  string(3) "DCX"
  [33]=>
  string(3) "DDS"
  [34]=>
  string(5) "DFONT"
  [35]=>
  string(4) "DJVU"
  [36]=>
  string(3) "DNG"
  [37]=>
  string(3) "DOT"
  [38]=>
  string(3) "DPS"
  [39]=>
  string(3) "DPX"
  [40]=>
  string(4) "DXT1"
  [41]=>
  string(4) "DXT5"
  [42]=>
  string(3) "EMF"
  [43]=>
  string(4) "EPDF"
  [44]=>
  string(3) "EPI"
  [45]=>
  string(3) "EPS"
  [46]=>
  string(4) "EPS2"
  [47]=>
  string(4) "EPS3"
  [48]=>
  string(4) "EPSF"
  [49]=>
  string(4) "EPSI"
  [50]=>
  string(3) "EPT"
  [51]=>
  string(4) "EPT2"
  [52]=>
  string(4) "EPT3"
  [53]=>
  string(3) "ERF"
  [54]=>
  string(3) "EXR"
  [55]=>
  string(3) "FAX"
  [56]=>
  string(4) "FITS"
  [57]=>
  string(3) "FPX"
  [58]=>
  string(7) "FRACTAL"
  [59]=>
  string(3) "FTS"
  [60]=>
  string(2) "G3"
  [61]=>
  string(3) "GIF"
  [62]=>
  string(5) "GIF87"
  [63]=>
  string(8) "GRADIENT"
  [64]=>
  string(4) "GRAY"
  [65]=>
  string(6) "GROUP4"
  [66]=>
  string(2) "GV"
  [67]=>
  string(1) "H"
  [68]=>
  string(4) "HALD"
  [69]=>
  string(3) "HDR"
  [70]=>
  string(9) "HISTOGRAM"
  [71]=>
  string(3) "HRZ"
  [72]=>
  string(3) "HTM"
  [73]=>
  string(4) "HTML"
  [74]=>
  string(3) "ICB"
  [75]=>
  string(3) "ICO"
  [76]=>
  string(4) "ICON"
  [77]=>
  string(3) "IIQ"
  [78]=>
  string(4) "INFO"
  [79]=>
  string(6) "INLINE"
  [80]=>
  string(3) "IPL"
  [81]=>
  string(6) "ISOBRL"
  [82]=>
  string(7) "ISOBRL6"
  [83]=>
  string(3) "J2C"
  [84]=>
  string(3) "J2K"
  [85]=>
  string(3) "JBG"
  [86]=>
  string(4) "JBIG"
  [87]=>
  string(3) "JNG"
  [88]=>
  string(3) "JNX"
  [89]=>
  string(3) "JP2"
  [90]=>
  string(3) "JPC"
  [91]=>
  string(3) "JPE"
  [92]=>
  string(4) "JPEG"
  [93]=>
  string(3) "JPG"
  [94]=>
  string(3) "JPM"
  [95]=>
  string(3) "JPS"
  [96]=>
  string(3) "JPT"
  [97]=>
  string(4) "JSON"
  [98]=>
  string(3) "K25"
  [99]=>
  string(3) "KDC"
  [100]=>
  string(5) "LABEL"
  [101]=>
  string(3) "M2V"
  [102]=>
  string(3) "M4V"
  [103]=>
  string(3) "MAC"
  [104]=>
  string(6) "MAGICK"
  [105]=>
  string(3) "MAP"
  [106]=>
  string(4) "MASK"
  [107]=>
  string(3) "MAT"
  [108]=>
  string(5) "MATTE"
  [109]=>
  string(3) "MEF"
  [110]=>
  string(4) "MIFF"
  [111]=>
  string(3) "MKV"
  [112]=>
  string(3) "MNG"
  [113]=>
  string(4) "MONO"
  [114]=>
  string(3) "MOV"
  [115]=>
  string(3) "MP4"
  [116]=>
  string(3) "MPC"
  [117]=>
  string(4) "MPEG"
  [118]=>
  string(3) "MPG"
  [119]=>
  string(3) "MRW"
  [120]=>
  string(3) "MSL"
  [121]=>
  string(4) "MSVG"
  [122]=>
  string(3) "MTV"
  [123]=>
  string(3) "MVG"
  [124]=>
  string(3) "NEF"
  [125]=>
  string(3) "NRW"
  [126]=>
  string(4) "NULL"
  [127]=>
  string(3) "ORF"
  [128]=>
  string(3) "OTB"
  [129]=>
  string(3) "OTF"
  [130]=>
  string(3) "PAL"
  [131]=>
  string(4) "PALM"
  [132]=>
  string(3) "PAM"
  [133]=>
  string(5) "PANGO"
  [134]=>
  string(7) "PATTERN"
  [135]=>
  string(3) "PBM"
  [136]=>
  string(3) "PCD"
  [137]=>
  string(4) "PCDS"
  [138]=>
  string(3) "PCL"
  [139]=>
  string(3) "PCT"
  [140]=>
  string(3) "PCX"
  [141]=>
  string(3) "PDB"
  [142]=>
  string(3) "PDF"
  [143]=>
  string(4) "PDFA"
  [144]=>
  string(3) "PEF"
  [145]=>
  string(3) "PES"
  [146]=>
  string(3) "PFA"
  [147]=>
  string(3) "PFB"
  [148]=>
  string(3) "PFM"
  [149]=>
  string(3) "PGM"
  [150]=>
  string(5) "PICON"
  [151]=>
  string(4) "PICT"
  [152]=>
  string(3) "PIX"
  [153]=>
  string(5) "PJPEG"
  [154]=>
  string(6) "PLASMA"
  [155]=>
  string(3) "PNG"
  [156]=>
  string(5) "PNG00"
  [157]=>
  string(5) "PNG24"
  [158]=>
  string(5) "PNG32"
  [159]=>
  string(5) "PNG48"
  [160]=>
  string(5) "PNG64"
  [161]=>
  string(4) "PNG8"
  [162]=>
  string(3) "PNM"
  [163]=>
  string(3) "PPM"
  [164]=>
  string(7) "PREVIEW"
  [165]=>
  string(2) "PS"
  [166]=>
  string(3) "PS2"
  [167]=>
  string(3) "PS3"
  [168]=>
  string(3) "PSB"
  [169]=>
  string(3) "PSD"
  [170]=>
  string(4) "PTIF"
  [171]=>
  string(3) "PWP"
  [172]=>
  string(15) "RADIAL-GRADIENT"
  [173]=>
  string(3) "RAF"
  [174]=>
  string(3) "RAS"
  [175]=>
  string(3) "RAW"
  [176]=>
  string(3) "RGB"
  [177]=>
  string(4) "RGBA"
  [178]=>
  string(4) "RGBO"
  [179]=>
  string(3) "RGF"
  [180]=>
  string(3) "RLA"
  [181]=>
  string(3) "RLE"
  [182]=>
  string(3) "RMF"
  [183]=>
  string(3) "RW2"
  [184]=>
  string(3) "SCR"
  [185]=>
  string(10) "SCREENSHOT"
  [186]=>
  string(3) "SCT"
  [187]=>
  string(3) "SFW"
  [188]=>
  string(3) "SGI"
  [189]=>
  string(5) "SHTML"
  [190]=>
  string(3) "SIX"
  [191]=>
  string(5) "SIXEL"
  [192]=>
  string(12) "SPARSE-COLOR"
  [193]=>
  string(3) "SR2"
  [194]=>
  string(3) "SRF"
  [195]=>
  string(7) "STEGANO"
  [196]=>
  string(3) "SUN"
  [197]=>
  string(3) "SVG"
  [198]=>
  string(4) "SVGZ"
  [199]=>
  string(4) "TEXT"
  [200]=>
  string(3) "TGA"
  [201]=>
  string(9) "THUMBNAIL"
  [202]=>
  string(4) "TIFF"
  [203]=>
  string(6) "TIFF64"
  [204]=>
  string(4) "TILE"
  [205]=>
  string(3) "TIM"
  [206]=>
  string(3) "TTC"
  [207]=>
  string(3) "TTF"
  [208]=>
  string(3) "TXT"
  [209]=>
  string(4) "UBRL"
  [210]=>
  string(5) "UBRL6"
  [211]=>
  string(3) "UIL"
  [212]=>
  string(4) "UYVY"
  [213]=>
  string(3) "VDA"
  [214]=>
  string(5) "VICAR"
  [215]=>
  string(3) "VID"
  [216]=>
  string(4) "VIFF"
  [217]=>
  string(4) "VIPS"
  [218]=>
  string(3) "VST"
  [219]=>
  string(4) "WBMP"
  [220]=>
  string(4) "WEBP"
  [221]=>
  string(3) "WMF"
  [222]=>
  string(3) "WMV"
  [223]=>
  string(3) "WPG"
  [224]=>
  string(3) "X3F"
  [225]=>
  string(3) "XBM"
  [226]=>
  string(2) "XC"
  [227]=>
  string(3) "XCF"
  [228]=>
  string(3) "XPM"
  [229]=>
  string(3) "XPS"
  [230]=>
  string(2) "XV"
  [231]=>
  string(5) "YCbCr"
  [232]=>
  string(6) "YCbCrA"
  [233]=>
  string(3) "YUV"
}

0 个答案:

没有答案