Imagick

(PECL imagick 2, PECL imagick 3)

类概要

class Imagick implements Iterator {
public __construct(mixed $files = ?)
public adaptiveBlurImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool
public adaptiveResizeImage(
    int $columns,
    int $rows,
    bool $bestfit = false,
    bool $legacy = false
): bool
public adaptiveSharpenImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool
public adaptiveThresholdImage(int $width, int $height, int $offset): bool
public addImage(Imagick $source): bool
public addNoiseImage(int $noise_type, int $channel = Imagick::CHANNEL_DEFAULT): bool
public animateImages(string $x_server): bool
public annotateImage(
    ImagickDraw $draw_settings,
    float $x,
    float $y,
    float $angle,
    string $text
): bool
public appendImages(bool $stack): Imagick
public autoLevelImage(int $channel = Imagick::CHANNEL_DEFAULT): bool
public blackThresholdImage(mixed $threshold): bool
public blueShiftImage(float $factor = 1.5): bool
public blurImage(float $radius, float $sigma, int $channel = ?): bool
public borderImage(mixed $bordercolor, int $width, int $height): bool
public brightnessContrastImage(float $brightness, float $contrast, int $channel = Imagick::CHANNEL_DEFAULT): bool
public charcoalImage(float $radius, float $sigma): bool
public chopImage(
    int $width,
    int $height,
    int $x,
    int $y
): bool
public clampImage(int $channel = Imagick::CHANNEL_DEFAULT): bool
public clear(): bool
public clipImage(): bool
public clipImagePath(string $pathname, string $inside): void
public clipPathImage(string $pathname, bool $inside): bool
public clone(): Imagick
public clutImage(Imagick $lookup_table, int $channel = Imagick::CHANNEL_DEFAULT): bool
public colorFloodfillImage(
    mixed $fill,
    float $fuzz,
    mixed $bordercolor,
    int $x,
    int $y
): bool
public colorizeImage(mixed $colorize, mixed $opacity, bool $legacy = false): bool
public colorMatrixImage(array $color_matrix = Imagick::CHANNEL_DEFAULT): bool
public combineImages(int $channelType): Imagick
public commentImage(string $comment): bool
public compareImageChannels(Imagick $image, int $channelType, int $metricType): array
public compareImageLayers(int $method): Imagick
public compareImages(Imagick $compare, int $metric): array
public compositeImage(
    Imagick $composite_object,
    int $composite,
    int $x,
    int $y,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public contrastImage(bool $sharpen): bool
public contrastStretchImage(float $black_point, float $white_point, int $channel = Imagick::CHANNEL_DEFAULT): bool
public convolveImage(array $kernel, int $channel = Imagick::CHANNEL_DEFAULT): bool
public count(int $mode = 0): int
public cropImage(
    int $width,
    int $height,
    int $x,
    int $y
): bool
public cropThumbnailImage(int $width, int $height, bool $legacy = false): bool
public current(): Imagick
public cycleColormapImage(int $displace): bool
public decipherImage(string $passphrase): bool
public deleteImageArtifact(string $artifact): bool
public deskewImage(float $threshold): bool
public destroy(): bool
public displayImage(string $servername): bool
public displayImages(string $servername): bool
public distortImage(int $method, array $arguments, bool $bestfit): bool
public drawImage(ImagickDraw $draw): bool
public edgeImage(float $radius): bool
public embossImage(float $radius, float $sigma): bool
public encipherImage(string $passphrase): bool
public enhanceImage(): bool
public evaluateImage(int $op, float $constant, int $channel = Imagick::CHANNEL_DEFAULT): bool
public exportImagePixels(
    int $x,
    int $y,
    int $width,
    int $height,
    string $map,
    int $STORAGE
): array
public extentImage(
    int $width,
    int $height,
    int $x,
    int $y
): bool
public filter(ImagickKernel $ImagickKernel, int $channel = Imagick::CHANNEL_UNDEFINED): bool
public flipImage(): bool
public floodFillPaintImage(
    mixed $fill,
    float $fuzz,
    混合 $target,
    int $x,
    int $y,
    布尔值 $invert,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public frameImage(
    混合 $matte_color,
    int $width,
    int $height,
    整数 $inner_bevel,
    整数 $outer_bevel
): bool
public functionImage(整数 $function, 数组 $arguments, 整数 $channel = Imagick::CHANNEL_DEFAULT): 布尔值
public fxImage(字符串 $expression, 整数 $channel = Imagick::CHANNEL_DEFAULT): Imagick
public gammaImage(浮点数 $gamma, 整数 $channel = Imagick::CHANNEL_DEFAULT): 布尔值
public gaussianBlurImage(浮点数 $radius, 浮点数 $sigma, 整数 $channel = Imagick::CHANNEL_DEFAULT): 布尔值
public static getCopyright(): 字符串
public getFont(): 字符串
public getGravity(): 整数
public static getHomeURL(): 字符串
public getImage(): Imagick
public getImageChannelDistortion(Imagick $reference, 整数 $channel, 整数 $metric): 浮点数
public getImageChannelDistortions(Imagick $reference, 整数 $metric, 整数 $channel = Imagick::CHANNEL_DEFAULT): 浮点数
public getImageChannelKurtosis(整数 $channel = Imagick::CHANNEL_DEFAULT): 数组
public getImageDistortion(MagickWand $reference, 整数 $metric): 浮点数
public getImageProfiles(string $pattern = "*", bool $include_values = true): array
public getImageProperties(string $pattern = "*", bool $include_values = true): array
public getImageRegion(
    int $width,
    int $height,
    int $x,
    int $y
): Imagick
public getImageScene(): int
public getImageSize(): int
public getImageType(): int
public getImageUnits(): int
public getImageWidth(): int
public getOption(string $key): string
public static getPackageName(): string
public getPage(): array
public getPixelRegionIterator(
    int $x,
    int $y,
    int $columns,
    int $rows
): ImagickPixelIterator
public static getQuantum(): int
public static getQuantumDepth(): array
public static getQuantumRange(): array
public static getRegistry(string $key): string
public static getReleaseDate(): string
public static getResource(int $type): int
public static getResourceLimit(int $type): int
public getSize(): array
public getSizeOffset(): int
public static getVersion(): array
public haldClutImage(Imagick $clut, int $channel = Imagick::CHANNEL_DEFAULT): bool
public hasNextImage(): bool
public identifyFormat(string $embedText): string|false
public identifyImage(bool $appendRawOutput = false): array
public implodeImage(float $radius): bool
public importImagePixels(
    int $x,
    int $y,
    int $width,
    int $height,
    string $map,
    int $storage,
    数组 $pixels
): bool
public inverseFourierTransformImage(Imagick $complement, 布尔值 $magnitude): 布尔值
public levelImage(
    浮点数 $blackPoint,
    浮点数 $gamma,
    浮点数 $whitePoint,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public linearStretchImage(浮点数 $blackPoint, 浮点数 $whitePoint): 布尔值
public liquidRescaleImage(
    int $width,
    int $height,
    浮点数 $delta_x,
    浮点数 $rigidity
): bool
public static listRegistry(): 数组
public mapImage(Imagick $map, 布尔值 $dither): 布尔值
public matteFloodfillImage(
    浮点数 $alpha,
    float $fuzz,
    mixed $bordercolor,
    int $x,
    int $y
): bool
public mergeImageLayers(整数 $layer_method): Imagick
public modulateImage(浮点数 $brightness, 浮点数 $saturation, 浮点数 $hue): 布尔值
public montageImage(
    ImagickDraw $draw,
    字符串 $tile_geometry,
    字符串 $thumbnail_geometry,
    整数 $mode,
    字符串 $frame
): Imagick
public morphImages(整数 $number_frames): Imagick
public morphology(
    整数 $morphologyMethod,
    整数 $iterations,
    ImagickKernel $ImagickKernel,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public motionBlurImage(
    浮点数 $radius,
    浮点数 $sigma,
    float $angle,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public negateImage(布尔值 $gray, 整数 $channel = Imagick::CHANNEL_DEFAULT): 布尔值
public newImage(
    整数 $cols,
    int $rows,
    混合类型 $background,
    字符串 $format = ?
): bool
public newPseudoImage(整数 $columns, 整数 $rows, 字符串 $pseudoString): 布尔值
public normalizeImage(整数 $channel = Imagick::CHANNEL_DEFAULT): 布尔值
public opaquePaintImage(
    混合 $target,
    mixed $fill,
    float $fuzz,
    布尔值 $invert,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public orderedPosterizeImage(字符串 $threshold_map, 整数 $channel = Imagick::CHANNEL_DEFAULT): 布尔值
public paintFloodfillImage(
    mixed $fill,
    float $fuzz,
    mixed $bordercolor,
    int $x,
    int $y,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public paintOpaqueImage(
    混合 $target,
    mixed $fill,
    float $fuzz,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public pingImage(字符串 $filename): 布尔值
public pingImageFile(资源 $filehandle, 字符串 $fileName = ?): 布尔值
public polaroidImage(ImagickDraw $properties, 浮点数 $angle): 布尔值
public posterizeImage(整数 $levels, 布尔值 $dither): 布尔值
public previewImages(整数 $preview): 布尔值
public profileImage(字符串 $name, ?string $profile): 布尔值
public quantizeImage(
    整数 $numberColors,
    整数 $colorspace,
    整数 $treedepth,
    布尔值 $dither,
    布尔值 $measureError
): bool
public quantizeImages(
    整数 $numberColors,
    整数 $colorspace,
    整数 $treedepth,
    布尔值 $dither,
    布尔值 $measureError
): bool
public queryFontMetrics(ImagickDraw $properties, string $text, bool $multiline = ?): array
public static queryFonts(string $pattern = "*"): array
public static queryFormats(string $pattern = "*"): array
public radialBlurImage(float $angle, int $channel = Imagick::CHANNEL_DEFAULT): bool
public raiseImage(
    int $width,
    int $height,
    int $x,
    int $y,
    bool $raise
): bool
public randomThresholdImage(float $low, float $high, int $channel = Imagick::CHANNEL_DEFAULT): bool
public readImage(string $filename): bool
public readImageBlob(string $image, string $filename = ?): bool
public readImageFile(resource $filehandle, string $fileName = null): bool
public readImages(array $filenames): bool
public recolorImage(array $matrix): bool
public reduceNoiseImage(float $radius): bool
public remapImage(Imagick $replacement, int $DITHER): bool
public removeImage(): bool
public render(): bool
public resampleImage(
    float $x_resolution,
    float $y_resolution,
    int $filter,
    float $blur
): bool
public resetImagePage(string $page): bool
public resizeImage(
    int $columns,
    int $rows,
    int $filter,
    float $blur,
    bool $bestfit = false,
    bool $legacy = false
): bool
public rollImage(int $x, int $y): bool
public rotateImage(mixed $background, float $degrees): bool
public rotationalBlurImage(float $angle, int $channel = Imagick::CHANNEL_DEFAULT): bool
public roundCorners(
    float $x_rounding,
    float $y_rounding,
    float $stroke_width = 10,
    float $displace = 5,
    float $size_correction = -6
): bool
public sampleImage(int $columns, int $rows): bool
public scaleImage(
    int $columns,
    int $rows,
    bool $bestfit = false,
    bool $legacy = false
): bool
public segmentImage(
    int $COLORSPACE,
    float $cluster_threshold,
    float $smooth_threshold,
    bool $verbose = false
): bool
public selectiveBlurImage(
    浮点数 $radius,
    浮点数 $sigma,
    float $threshold,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public separateImageChannel(int $channel): bool
public sepiaToneImage(float $threshold): bool
public setBackgroundColor(mixed $background): bool
public setColorspace(int $COLORSPACE): bool
public setCompression(int $compression): bool
public setCompressionQuality(int $quality): bool
public setFilename(string $filename): bool
public setFont(string $font): bool
public setFormat(string $format): bool
public setGravity(int $gravity): bool
public setImage(Imagick $replace): bool
public setImageArtifact(string $artifact, string $value): bool
public setImageAttribute(string $key, string $value): bool
public setImageBackgroundColor(混合 $background): bool
public setImageBias(float $bias): bool
public setImageChannelDepth(int $channel, int $depth): bool
public setImageClipMask(Imagick $clip_mask): bool
public setImageColormapColor(int $index, ImagickPixel $color): bool
public setImageColorspace(int $colorspace): bool
public setImageCompose(int $compose): bool
public setImageCompression(int $compression): bool
public setImageDelay(int $delay): bool
public setImageDepth(int $depth): bool
public setImageDispose(int $dispose): bool
public setImageExtent(int $columns, int $rows): bool
public setImageFilename(string $filename): bool
public setImageFormat(string $format): bool
public setImageGamma(float $gamma): bool
public setImageGravity(int $gravity): bool
public setImageIndex(int $index): bool
public setImageInterlaceScheme(int $interlace_scheme): bool
public setImageIterations(int $iterations): bool
public setImageMatte(bool $matte): bool
public setImageOpacity(float $opacity): bool
public setImageOrientation(int $orientation): bool
public setImagePage(
    int $width,
    int $height,
    int $x,
    int $y
): bool
public setImageProfile(string $name, string $profile): bool
public setImageProperty(string $name, string $value): bool
public setImageRenderingIntent(int $rendering_intent): bool
public setImageResolution(float $x_resolution, float $y_resolution): bool
public setImageScene(int $scene): bool
public setImageTicksPerSecond(int $ticks_per_second): bool
public setImageType(int $image_type): bool
public setImageUnits(int $units): bool
public setInterlaceScheme(int $interlace_scheme): bool
public setIteratorIndex(int $index): bool
public setOption(string $key, string $value): bool
public setPage(
    int $width,
    int $height,
    int $x,
    int $y
): bool
public setPointSize(float $point_size): bool
public setProgressMonitor(callable $callback): bool
public static setRegistry(string $key, string $value): bool
public setResolution(float $x_resolution, float $y_resolution): bool
public static setResourceLimit(int $type, int $limit): bool
public setSamplingFactors(array $factors): bool
public setSize(int $columns, int $rows): bool
public setSizeOffset(int $columns, int $rows, int $offset): bool
public setType(int $image_type): bool
public shadeImage(bool $gray, float $azimuth, float $elevation): bool
public shadowImage(
    float $opacity,
    浮点数 $sigma,
    int $x,
    int $y
): bool
public sharpenImage(float $radius, float $sigma, public shaveImage(int $columns, int $rows): bool
public shearImage(mixed $background, float $x_shear, float $y_shear): bool
public sigmoidalContrastImage(
    bool $sharpen,
    浮点数 $alpha,
    float $beta,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public sketchImage(float $radius, float $sigma, float $angle): bool
public smushImages(bool $stack, int $offset): Imagick
public solarizeImage(int $threshold): bool
public sparseColorImage(int $SPARSE_METHOD, array $arguments, int $channel = Imagick::CHANNEL_DEFAULT): bool
public spliceImage(
    int $width,
    int $height,
    int $x,
    int $y
): bool
public spreadImage(float $radius): bool
public statisticImage(
    int $type,
    int $width,
    int $height,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public steganoImage(Imagick $watermark_wand, int $offset): Imagick
public stereoImage(Imagick $offset_wand): bool
public stripImage(): bool
public subImageMatch(Imagick $Imagick, array &$offset = ?, float &$similarity = ?): Imagick
swirlImage(float $degrees): bool
textureImage(Imagick $texture_wand): Imagick
public thresholdImage(float $threshold, int $channel = Imagick::CHANNEL_DEFAULT): bool
public thumbnailImage(
    int $columns,
    int $rows,
    bool $bestfit = false,
    bool $fill = false,
    bool $legacy = false
): bool
public tintImage(混合 $tint, 混合 $opacity, 布尔值 $legacy = false): 布尔值
public transformImage(字符串 $crop, 字符串 $geometry): Imagick
public transparentPaintImage(
    混合 $target,
    浮点数 $alpha,
    float $fuzz,
    布尔值 $invert
): bool
public unsharpMaskImage(
    浮点数 $radius,
    浮点数 $sigma,
    浮点数 $amount,
    float $threshold,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public valid(): 布尔值
public vignetteImage(
    浮点数 $blackPoint,
    浮点数 $whitePoint,
    int $x,
    int $y
): bool
public waveImage(浮点数 $amplitude, 浮点数 $length): 布尔值
public writeImage(字符串 $filename = NULL): 布尔值
public writeImageFile(资源 $filehandle, 字符串 $format = ?): 布尔值
public writeImages(字符串 $filename, 布尔值 $adjoin): 布尔值
public writeImagesFile(资源 $filehandle, 字符串 $format = ?): 布尔值
}

图像方法和全局方法

Imagick 类能够同时保存和操作多个图像。这是通过内部堆栈实现的。始终有一个内部指针指向当前图像。某些函数作用于 Imagick 类中的所有图像,但大多数函数仅作用于内部堆栈中的当前图像。按照惯例,方法名称可以包含单词 Image,表示它们仅影响堆栈中的当前图像。

类方法

由于方法很多,这里提供一个简便的方法列表,大致按照其用途归类。

按用途分类的类方法
图像效果 获取方法 设置方法 读取/写入图像 其他
Imagick::adaptiveBlurImage() Imagick::getCompression() Imagick::setBackgroundColor() Imagick::__construct() Imagick::clear()
Imagick::adaptiveResizeImage() Imagick::getFilename() Imagick::setCompressionQuality() Imagick::addImage() Imagick::clone()
Imagick::adaptiveSharpenImage() Imagick::getFormat() Imagick::setCompression() Imagick::appendImages() Imagick::current()
Imagick::adaptiveThresholdImage() Imagick::getImageBackgroundColor() Imagick::setFilename() Imagick::getFilename() Imagick::destroy()
Imagick::addNoiseImage() Imagick::getImageBlob() Imagick::getImagesBlob() Imagick::setFormat() Imagick::getFormat()
Imagick::affinetransformimage() Imagick::getImageBluePrimary() Imagick::setImageBackgroundColor() Imagick::getImageFilename() Imagick::getHomeURL()
Imagick::annotateImage() Imagick::getImageBorderColor() Imagick::setFirstIterator() Imagick::getImageFormat() Imagick::commentImage()
Imagick::averageImages() Imagick::getImageChannelDepth() Imagick::setImageBias() Imagick::getImage() Imagick::getNumberImages()
Imagick::blackThresholdImage() Imagick::getImageChannelDistortion() Imagick::setImageBluePrimary() Imagick::setImageFilename() Imagick::getReleaseDate()
Imagick::blurImage() Imagick::getImageChannelExtrema() Imagick::setImageBorderColor() Imagick::setImageFormat() Imagick::getVersion()
Imagick::borderImage() Imagick::getImageChannelMean() Imagick::setImageChannelDepth() Imagick::readImageFile() Imagick::hasNextImage()
Imagick::charcoalImage() Imagick::getImageChannelStatistics() Imagick::setImageColormapColor() Imagick::readImage() Imagick::hasPreviousImage()
Imagick::chopImage() Imagick::getImageColormapColor() Imagick::setImageColorSpace() Imagick::writeImages() Imagick::labelImage()
Imagick::clipImage() Imagick::getImageColorspace() Imagick::setImageCompose() Imagick::writeImage() Imagick::newImage()
Imagick::clipPathImage() Imagick::getImageColors() Imagick::setImageCompression()   Imagick::newPseudoImage()
Imagick::coalesceImages() Imagick::getImageCompose() Imagick::setImageDelay()   Imagick::nextImage()
Imagick::colorFloodFillImage() Imagick::getImageDelay() Imagick::setImageDepth()   Imagick::pingImageBlob()
Imagick::colorizeImage() Imagick::getImageDepth() Imagick::setImageDispose()   Imagick::pingImageFile()
Imagick::combineImages() Imagick::getImageDispose() Imagick::setImageDispose()   Imagick::pingImage()
Imagick::compareImageChannels() Imagick::getImageDistortion() Imagick::setImageExtent()   Imagick::previousImage()
Imagick::compareImageLayers() Imagick::getImageExtrema() Imagick::setImageFilename()   Imagick::profileImage()
Imagick::compositeImage() Imagick::getImageFilename() Imagick::setImageFormat()   Imagick::queryFormats()
Imagick::contrastImage() Imagick::getImageFormat() Imagick::setImageGamma()   Imagick::removeImageProfile()
Imagick::contrastStretchImage() Imagick::getImageGamma() Imagick::setImageGreenPrimary()   Imagick::removeImage()
Imagick::convolveImage() Imagick::getImageGeometry() Imagick::setImageIndex()   Imagick::setFirstIterator()
Imagick::cropImage() Imagick::getImageGreenPrimary() Imagick::setImageInterpolateMethod()   Imagick::setImageIndex()
Imagick::cycleColormapImage() Imagick::getImageHeight() Imagick::setImageIterations()   Imagick::valid()
Imagick::deconstructImages() Imagick::getImageHistogram() Imagick::setImageMatteColor()   Imagick::getCopyright()
Imagick::drawImage() Imagick::getImageIndex() Imagick::setImageMatte()    
Imagick::edgeImage() Imagick::getImageInterlaceScheme() Imagick::setImagePage()    
Imagick::embossImage() Imagick::getImageInterpolateMethod() Imagick::setImageProfile()    
Imagick::enhanceImage() Imagick::getImageIterations() Imagick::setImageProperty()    
Imagick::equalizeImage() Imagick::getImageMatteColor() Imagick::setImageRedPrimary()    
Imagick::evaluateImage() Imagick::getImageMatte() Imagick::setImageRenderingIntent()    
Imagick::flattenImages() Imagick::getImagePage() Imagick::setImageResolution()    
Imagick::flipImage() Imagick::getImagePixelColor() Imagick::setImageScene()    
Imagick::flopImage() Imagick::getImageProfile() Imagick::setImageTicksPerSecond()    
  Imagick::getImageProperty() Imagick::setImageType()    
Imagick::fxImage() Imagick::getImageRedPrimary() Imagick::setImageUnits()    
Imagick::gammaImage() Imagick::getImageRegion() Imagick::setImageVirtualPixelMethod()    
Imagick::gaussianBlurImage() Imagick::getImageRenderingIntent() Imagick::setImageWhitepoint()    
Imagick::implodeImage() Imagick::getImageResolution() Imagick::setInterlaceScheme()    
Imagick::levelImage() Imagick::getImageScene() Imagick::setOption()    
Imagick::linearStretchImage() Imagick::getImageSignature() Imagick::setPage()    
Imagick::magnifyImage() Imagick::getImageTicksPerSecond() Imagick::setResolution()    
Imagick::matteFloodFillImage() Imagick::getImageTotalInkDensity() Imagick::setResourceLimit()    
Imagick::medianFilterImage() Imagick::getImageType() Imagick::setSamplingFactors()    
Imagick::minifyImage() Imagick::getImageUnits() Imagick::setSizeOffset()    
Imagick::modulateImage() Imagick::getImageVirtualPixelMethod() Imagick::setSize()    
Imagick::montageImage() Imagick::getImageWhitepoint() Imagick::setType()    
Imagick::morphImages() Imagick::getImageWidth()      
Imagick::mosaicImages() Imagick::getImage()      
Imagick::motionBlurImage() Imagick::getInterlaceScheme()      
Imagick::negateImage() Imagick::getNumberImages()      
Imagick::normalizeImage() Imagick::getOption()      
Imagick::oilPaintImage() Imagick::getPackageName()      
Imagick::optimizeImageLayers() Imagick::getPage()      
Imagick::paintOpaqueImage() Imagick::getPixelIterator()      
Imagick::paintTransparentImage() Imagick::getPixelRegionIterator()      
Imagick::posterizeImage() Imagick::getQuantumDepth()      
Imagick::radialBlurImage() Imagick::getQuantumRange()      
Imagick::raiseImage() Imagick::getResourceLimit()      
Imagick::randomThresholdImage() Imagick::getResource()      
Imagick::reduceNoiseImage() Imagick::getSamplingFactors()      
Imagick::render() Imagick::getSizeOffset()      
Imagick::resampleImage() Imagick::getSize()      
Imagick::resizeImage() Imagick::identifyImage()      
Imagick::rollImage() Imagick::getImageSize()      
Imagick::rotateImage()        
Imagick::sampleImage()        
Imagick::scaleImage()        
Imagick::separateImageChannel()        
Imagick::sepiaToneImage()        
Imagick::shadeImage()        
Imagick::shadowImage()        
Imagick::sharpenImage()        
Imagick::shaveImage()        
Imagick::shearImage()        
Imagick::sigmoidalContrastImage()        
Imagick::sketchImage()        
Imagick::solarizeImage()        
Imagick::spliceImage()        
Imagick::spreadImage()        
Imagick::steganoImage()        
Imagick::stereoImage()        
Imagick::stripImage()        
Imagick::swirlImage()        
Imagick::textureImage()        
Imagick::thresholdImage()        
Imagick::thumbnailImage()        
Imagick::tintImage()        
Imagick::transverseImage()        
Imagick::trimImage()        
Imagick::uniqueImageColors()        
Imagick::unsharpMaskImage()        
Imagick::vignetteImage()        
Imagick::waveImage()        
Imagick::whiteThresholdImage()        

目录

添加注释

用户贡献的注释 3 个注释

StealthFox at live dot com
15 年前
希望使用这些函数保存的用户应该知道,这可以很容易地实现,例如

<?php
header
("Content-Type: image/{$Imagick->getImageFormat()}");
$data = $Imagick->getImageBlob ();
echo
$data;
file_put_contents ('test.png', $data);
?>

这将显示图像,然后将其保存到 test.png。尤其是在您需要在创建图像后重新加载图像或保存以备将来使用时,此类操作很有用。:)
benkuhl at gmail dot com
11 年前
在使用此库处理 PDF 时,术语“图像”适用于页面,其中指针从文档的最后一页开始。

<?php

$document
= new Imagick('myPdf.pdf'); // 2 页 PDF

$document->getNumberImages(); // 返回 2

var_dump($document->hasNextImage()); // 返回 false - 请记住,我们现在位于最后一页
var_dump($document->hasPreviousImage()); // 返回 true

?>

如果您需要做更多工作,而不是从 PDF 生成缩略图,请使用 XPDF:http://www.foolabs.com/xpdf/home.html
php at mattjanssen dot com
13 年前
您可以在 http://www.graphicsmagick.org/wand/magick_wand.html 上找到所有这些 magick_wand 的文档 - Imagic 似乎是基于它构建的界面。
To Top