The Imagick class

(PECL imagick 2, PECL imagick 3)

类摘要

class Imagick implements Iterator {
public function __construct(mixed $files = ?)
public function adaptiveBlurImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function adaptiveResizeImage(
    int $columns,
    int $rows,
    bool $bestfit = false,
    bool $legacy = false
): bool
public function adaptiveSharpenImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function adaptiveThresholdImage(int $width, int $height, int $offset): bool
public function addImage(Imagick $source): bool
public function addNoiseImage(int $noise_type, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function affineTransformImage(ImagickDraw $matrix): bool
public function animateImages(string $x_server): bool
public function annotateImage(
    ImagickDraw $draw_settings,
    float $x,
    float $y,
    float $angle,
    string $text
): bool
public function appendImages(bool $stack): Imagick
public function autoLevelImage(int $channel = Imagick::CHANNEL_DEFAULT): bool
public function averageImages(): Imagick
public function blackThresholdImage(mixed $threshold): bool
public function blueShiftImage(float $factor = 1.5): bool
public function blurImage(float $radius, float $sigma, int $channel = ?): bool
public function borderImage(mixed $bordercolor, int $width, int $height): bool
public function brightnessContrastImage(float $brightness, float $contrast, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function charcoalImage(float $radius, float $sigma): bool
public function chopImage(
    int $width,
    int $height,
    int $x,
    int $y
): bool
public function clampImage(int $channel = Imagick::CHANNEL_DEFAULT): bool
public function clear(): bool
public function clipImage(): bool
public function clipImagePath(string $pathname, string $inside): void
public function clipPathImage(string $pathname, bool $inside): bool
public function clone(): Imagick
public function clutImage(Imagick $lookup_table, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function coalesceImages(): Imagick
public function colorFloodfillImage(
    mixed $fill,
    float $fuzz,
    mixed $bordercolor,
    int $x,
    int $y
): bool
public function colorizeImage(mixed $colorize, mixed $opacity, bool $legacy = false): bool
public function colorMatrixImage(array $color_matrix): bool
public function combineImages(int $channelType): Imagick
public function commentImage(string $comment): bool
public function compareImageChannels(Imagick $image, int $channelType, int $metricType): array
public function compareImageLayers(int $method): Imagick
public function compareImages(Imagick $compare, int $metric): array
public function compositeImage(
    Imagick $composite_object,
    int $composite,
    int $x,
    int $y,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public function contrastImage(bool $sharpen): bool
public function contrastStretchImage(float $black_point, float $white_point, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function convolveImage(array $kernel, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function count(int $mode = 0): int
public function cropImage(
    int $width,
    int $height,
    int $x,
    int $y
): bool
public function cropThumbnailImage(int $width, int $height, bool $legacy = false): bool
public function current(): Imagick
public function cycleColormapImage(int $displace): bool
public function decipherImage(string $passphrase): bool
public function deconstructImages(): Imagick
public function deleteImageArtifact(string $artifact): bool
public function deleteImageProperty(string $name): bool
public function deskewImage(float $threshold): bool
public function despeckleImage(): bool
public function destroy(): bool
public function displayImage(string $servername): bool
public function displayImages(string $servername): bool
public function distortImage(int $method, array $arguments, bool $bestfit): bool
public function drawImage(ImagickDraw $draw): bool
public function edgeImage(float $radius): bool
public function embossImage(float $radius, float $sigma): bool
public function encipherImage(string $passphrase): bool
public function enhanceImage(): bool
public function equalizeImage(): bool
public function evaluateImage(int $op, float $constant, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function exportImagePixels(
    int $x,
    int $y,
    int $width,
    int $height,
    string $map,
    int $STORAGE
): array
public function extentImage(
    int $width,
    int $height,
    int $x,
    int $y
): bool
public function filter(ImagickKernel $ImagickKernel, int $channel = Imagick::CHANNEL_UNDEFINED): bool
public function flattenImages(): Imagick
public function flipImage(): bool
public function floodFillPaintImage(
    mixed $fill,
    float $fuzz,
    mixed $target,
    int $x,
    int $y,
    bool $invert,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public function flopImage(): bool
public function forwardFourierTransformimage(bool $magnitude): bool
public function frameImage(
    mixed $matte_color,
    int $width,
    int $height,
    int $inner_bevel,
    int $outer_bevel
): bool
public function functionImage(int $function, array $arguments, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function fxImage(string $expression, int $channel = Imagick::CHANNEL_DEFAULT): Imagick
public function gammaImage(float $gamma, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function gaussianBlurImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function getColorspace(): int
public function getCompression(): int
public function getCompressionQuality(): int
public static function getCopyright(): string
public function getFilename(): string
public function getFont(): string
public function getFormat(): string
public function getGravity(): int
public static function getHomeURL(): string
public function getImage(): Imagick
public function getImageAlphaChannel(): bool
public function getImageArtifact(string $artifact): string
public function getImageAttribute(string $key): string
public function getImageBlob(): string
public function getImageBluePrimary(): array
public function getImageChannelDepth(int $channel): int
public function getImageChannelDistortion(Imagick $reference, int $channel, int $metric): float
public function getImageChannelDistortions(Imagick $reference, int $metric, int $channel = Imagick::CHANNEL_DEFAULT): float
public function getImageChannelExtrema(int $channel): array
public function getImageChannelKurtosis(int $channel = Imagick::CHANNEL_DEFAULT): array
public function getImageChannelMean(int $channel): array
public function getImageChannelRange(int $channel): array
public function getImageChannelStatistics(): array
public function getImageClipMask(): Imagick
public function getImageColormapColor(int $index): ImagickPixel
public function getImageColors(): int
public function getImageColorspace(): int
public function getImageCompose(): int
public function getImageCompression(): int
public function getImageCompressionQuality(): int
public function getImageDelay(): int
public function getImageDepth(): int
public function getImageDispose(): int
public function getImageDistortion(MagickWand $reference, int $metric): float
public function getImageExtrema(): array
public function getImageFilename(): string
public function getImageFormat(): string
public function getImageGamma(): float
public function getImageGeometry(): array
public function getImageGravity(): int
public function getImageGreenPrimary(): array
public function getImageHeight(): int
public function getImageHistogram(): array
public function getImageIndex(): int
public function getImageInterlaceScheme(): int
public function getImageInterpolateMethod(): int
public function getImageIterations(): int
public function getImageLength(): int
public function getImageMatte(): bool
public function getImageMatteColor(): ImagickPixel
public function getImageMimeType(): string
public function getImageOrientation(): int
public function getImagePage(): array
public function getImagePixelColor(int $x, int $y): ImagickPixel
public function getImageProfile(string $name): string
public function getImageProfiles(string $pattern = "*", bool $include_values = true): array
public function getImageProperties(string $pattern = "*", bool $include_values = true): array
public function getImageProperty(string $name): string
public function getImageRedPrimary(): array
public function getImageRegion(
    int $width,
    int $height,
    int $x,
    int $y
): Imagick
public function getImageRenderingIntent(): int
public function getImageResolution(): array
public function getImagesBlob(): string
public function getImageScene(): int
public function getImageSignature(): string
public function getImageSize(): int
public function getImageTicksPerSecond(): int
public function getImageTotalInkDensity(): float
public function getImageType(): int
public function getImageUnits(): int
public function getImageVirtualPixelMethod(): int
public function getImageWhitePoint(): array
public function getImageWidth(): int
public function getInterlaceScheme(): int
public function getIteratorIndex(): int
public function getNumberImages(): int
public function getOption(string $key): string
public static function getPackageName(): string
public function getPage(): array
public function getPixelRegionIterator(
    int $x,
    int $y,
    int $columns,
    int $rows
): ImagickPixelIterator
public function getPointSize(): float
public static function getQuantum(): int
public static function getQuantumDepth(): array
public static function getQuantumRange(): array
public static function getRegistry(string $key): string
public static function getReleaseDate(): string
public static function getResource(int $type): int
public static function getResourceLimit(int $type): int
public function getSamplingFactors(): array
public function getSize(): array
public function getSizeOffset(): int
public static function getVersion(): array
public function haldClutImage(Imagick $clut, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function hasNextImage(): bool
public function hasPreviousImage(): bool
public function identifyFormat(string $embedText): string|false
public function identifyImage(bool $appendRawOutput = false): array
public function implodeImage(float $radius): bool
public function importImagePixels(
    int $x,
    int $y,
    int $width,
    int $height,
    string $map,
    int $storage,
    array $pixels
): bool
public function inverseFourierTransformImage(Imagick $complement, bool $magnitude): bool
public function labelImage(string $label): bool
public function levelImage(
    float $blackPoint,
    float $gamma,
    float $whitePoint,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public function linearStretchImage(float $blackPoint, float $whitePoint): bool
public function liquidRescaleImage(
    int $width,
    int $height,
    float $delta_x,
    float $rigidity
): bool
public static function listRegistry(): array
public function magnifyImage(): bool
public function mapImage(Imagick $map, bool $dither): bool
public function matteFloodfillImage(
    float $alpha,
    float $fuzz,
    mixed $bordercolor,
    int $x,
    int $y
): bool
public function medianFilterImage(float $radius): bool
public function mergeImageLayers(int $layer_method): Imagick
public function minifyImage(): bool
public function modulateImage(float $brightness, float $saturation, float $hue): bool
public function montageImage(
    ImagickDraw $draw,
    string $tile_geometry,
    string $thumbnail_geometry,
    int $mode,
    string $frame
): Imagick
public function morphImages(int $number_frames): Imagick
public function morphology(
    int $morphologyMethod,
    int $iterations,
    ImagickKernel $ImagickKernel,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public function mosaicImages(): Imagick
public function motionBlurImage(
    float $radius,
    float $sigma,
    float $angle,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public function negateImage(bool $gray, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function newImage(
    int $cols,
    int $rows,
    mixed $background,
    string $format = ?
): bool
public function newPseudoImage(int $columns, int $rows, string $pseudoString): bool
public function nextImage(): bool
public function normalizeImage(int $channel = Imagick::CHANNEL_DEFAULT): bool
public function oilPaintImage(float $radius): bool
public function opaquePaintImage(
    mixed $target,
    mixed $fill,
    float $fuzz,
    bool $invert,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public function optimizeImageLayers(): bool
public function orderedPosterizeImage(string $threshold_map, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function paintFloodfillImage(
    mixed $fill,
    float $fuzz,
    mixed $bordercolor,
    int $x,
    int $y,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public function paintOpaqueImage(
    mixed $target,
    mixed $fill,
    float $fuzz,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public function paintTransparentImage(mixed $target, float $alpha, float $fuzz): bool
public function pingImage(string $filename): bool
public function pingImageBlob(string $image): bool
public function pingImageFile(resource $filehandle, string $fileName = ?): bool
public function polaroidImage(ImagickDraw $properties, float $angle): bool
public function posterizeImage(int $levels, bool $dither): bool
public function previewImages(int $preview): bool
public function previousImage(): bool
public function profileImage(string $name, string $profile = ?): bool
public function quantizeImage(
    int $numberColors,
    int $colorspace,
    int $treedepth,
    bool $dither,
    bool $measureError
): bool
public function quantizeImages(
    int $numberColors,
    int $colorspace,
    int $treedepth,
    bool $dither,
    bool $measureError
): bool
public function queryFontMetrics(ImagickDraw $properties, string $text, bool $multiline = ?): array
public static function queryFonts(string $pattern = "*"): array
public static function queryFormats(string $pattern = "*"): array
public function radialBlurImage(float $angle, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function raiseImage(
    int $width,
    int $height,
    int $x,
    int $y,
    bool $raise
): bool
public function randomThresholdImage(float $low, float $high, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function readImage(string $filename): bool
public function readImageBlob(string $image, string $filename = ?): bool
public function readImageFile(resource $filehandle, string $fileName = null): bool
public function readImages(array $filenames): bool
public function recolorImage(array $matrix): bool
public function reduceNoiseImage(float $radius): bool
public function remapImage(Imagick $replacement, int $DITHER): bool
public function removeImage(): bool
public function removeImageProfile(string $name): string
public function render(): bool
public function resampleImage(
    float $x_resolution,
    float $y_resolution,
    int $filter,
    float $blur
): bool
public function resetImagePage(string $page): bool
public function resizeImage(
    int $columns,
    int $rows,
    int $filter,
    float $blur,
    bool $bestfit = false,
    bool $legacy = false
): bool
public function rollImage(int $x, int $y): bool
public function rotateImage(mixed $background, float $degrees): bool
public function rotationalBlurImage(float $angle, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function roundCorners(
    float $x_rounding,
    float $y_rounding,
    float $stroke_width = 10,
    float $displace = 5,
    float $size_correction = -6
): bool
public function sampleImage(int $columns, int $rows): bool
public function scaleImage(
    int $columns,
    int $rows,
    bool $bestfit = false,
    bool $legacy = false
): bool
public function segmentImage(
    int $COLORSPACE,
    float $cluster_threshold,
    float $smooth_threshold,
    bool $verbose = false
): bool
public function selectiveBlurImage(
    float $radius,
    float $sigma,
    float $threshold,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public function separateImageChannel(int $channel): bool
public function sepiaToneImage(float $threshold): bool
public function setBackgroundColor(mixed $background): bool
public function setColorspace(int $COLORSPACE): bool
public function setCompression(int $compression): bool
public function setCompressionQuality(int $quality): bool
public function setFilename(string $filename): bool
public function setFirstIterator(): bool
public function setFont(string $font): bool
public function setFormat(string $format): bool
public function setGravity(int $gravity): bool
public function setImage(Imagick $replace): bool
public function setImageAlphaChannel(int $mode): bool
public function setImageArtifact(string $artifact, string $value): bool
public function setImageAttribute(string $key, string $value): bool
public function setImageBackgroundColor(mixed $background): bool
public function setImageBias(float $bias): bool
public function setImageBiasQuantum(float $bias): void
public function setImageBluePrimary(float $x, float $y): bool
public function setImageBorderColor(mixed $border): bool
public function setImageChannelDepth(int $channel, int $depth): bool
public function setImageClipMask(Imagick $clip_mask): bool
public function setImageColormapColor(int $index, ImagickPixel $color): bool
public function setImageColorspace(int $colorspace): bool
public function setImageCompose(int $compose): bool
public function setImageCompression(int $compression): bool
public function setImageCompressionQuality(int $quality): bool
public function setImageDelay(int $delay): bool
public function setImageDepth(int $depth): bool
public function setImageDispose(int $dispose): bool
public function setImageExtent(int $columns, int $rows): bool
public function setImageFilename(string $filename): bool
public function setImageFormat(string $format): bool
public function setImageGamma(float $gamma): bool
public function setImageGravity(int $gravity): bool
public function setImageGreenPrimary(float $x, float $y): bool
public function setImageIndex(int $index): bool
public function setImageInterlaceScheme(int $interlace_scheme): bool
public function setImageInterpolateMethod(int $method): bool
public function setImageIterations(int $iterations): bool
public function setImageMatte(bool $matte): bool
public function setImageMatteColor(mixed $matte): bool
public function setImageOpacity(float $opacity): bool
public function setImageOrientation(int $orientation): bool
public function setImagePage(
    int $width,
    int $height,
    int $x,
    int $y
): bool
public function setImageProfile(string $name, string $profile): bool
public function setImageProperty(string $name, string $value): bool
public function setImageRedPrimary(float $x, float $y): bool
public function setImageRenderingIntent(int $rendering_intent): bool
public function setImageResolution(float $x_resolution, float $y_resolution): bool
public function setImageScene(int $scene): bool
public function setImageTicksPerSecond(int $ticks_per_second): bool
public function setImageType(int $image_type): bool
public function setImageUnits(int $units): bool
public function setImageVirtualPixelMethod(int $method): bool
public function setImageWhitePoint(float $x, float $y): bool
public function setInterlaceScheme(int $interlace_scheme): bool
public function setIteratorIndex(int $index): bool
public function setLastIterator(): bool
public function setOption(string $key, string $value): bool
public function setPage(
    int $width,
    int $height,
    int $x,
    int $y
): bool
public function setPointSize(float $point_size): bool
public function setProgressMonitor(callable $callback): bool
public static function setRegistry(string $key, string $value): bool
public function setResolution(float $x_resolution, float $y_resolution): bool
public static function setResourceLimit(int $type, int $limit): bool
public function setSamplingFactors(array $factors): bool
public function setSize(int $columns, int $rows): bool
public function setSizeOffset(int $columns, int $rows, int $offset): bool
public function setType(int $image_type): bool
public function shadeImage(bool $gray, float $azimuth, float $elevation): bool
public function shadowImage(
    float $opacity,
    float $sigma,
    int $x,
    int $y
): bool
public function sharpenImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function shaveImage(int $columns, int $rows): bool
public function shearImage(mixed $background, float $x_shear, float $y_shear): bool
public function sigmoidalContrastImage(
    bool $sharpen,
    float $alpha,
    float $beta,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public function sketchImage(float $radius, float $sigma, float $angle): bool
public function smushImages(bool $stack, int $offset): Imagick
public function solarizeImage(int $threshold): bool
public function sparseColorImage(int $SPARSE_METHOD, array $arguments, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function spliceImage(
    int $width,
    int $height,
    int $x,
    int $y
): bool
public function spreadImage(float $radius): bool
public function statisticImage(
    int $type,
    int $width,
    int $height,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public function steganoImage(Imagick $watermark_wand, int $offset): Imagick
public function stereoImage(Imagick $offset_wand): bool
public function stripImage(): bool
public function subImageMatch(Imagick $Imagick, array &$offset = ?, float &$similarity = ?): Imagick
function swirlImage(float $degrees): bool
function textureImage(Imagick $texture_wand): Imagick
public function thresholdImage(float $threshold, int $channel = Imagick::CHANNEL_DEFAULT): bool
public function thumbnailImage(
    int $columns,
    int $rows,
    bool $bestfit = false,
    bool $fill = false,
    bool $legacy = false
): bool
public function tintImage(mixed $tint, mixed $opacity, bool $legacy = false): bool
public function __toString(): string
public function transformImage(string $crop, string $geometry): Imagick
public function transformImageColorspace(int $colorspace): bool
public function transparentPaintImage(
    mixed $target,
    float $alpha,
    float $fuzz,
    bool $invert
): bool
public function transposeImage(): bool
public function transverseImage(): bool
public function trimImage(float $fuzz): bool
public function uniqueImageColors(): bool
public function unsharpMaskImage(
    float $radius,
    float $sigma,
    float $amount,
    float $threshold,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool
public function valid(): bool
public function vignetteImage(
    float $blackPoint,
    float $whitePoint,
    int $x,
    int $y
): bool
public function waveImage(float $amplitude, float $length): bool
public function whiteThresholdImage(mixed $threshold): bool
public function writeImage(string $filename = NULL): bool
public function writeImageFile(resource $filehandle, string $format = ?): bool
public function writeImages(string $filename, bool $adjoin): bool
public function writeImagesFile(resource $filehandle, string $format = ?): bool
}

Image methods and global methods

The Imagick class has the ability to hold and operate on multiple images simultaneously. This is achieved through an internal stack. There is always an internal pointer that points at the current image. Some functions operate on all images in the Imagick class, but most operate only on the current image in the internal stack. As a convention, method names can contain the word Image to denote they affect only the current image in the stack.

Class Methods

Because there are so many methods, here is a handy list of methods, somewhat reduced to their general purpose:

Class methods by purpose
Image effects Get methods Set methods Read/write images Other
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()        

目录

添加备注

用户贡献的备注 2 notes

up
3
StealthFox at live dot com
17 years ago
Users looking to save  with these functions should know it can be done easily, for example

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

That would display the image, and then save it to test.png. Such things are helpful especially when you need to reload images after creating them or save for later. :)
up
1
benkuhl at gmail dot com
13 years ago
When using this library with PDFs, the term "image" applies to a page where the pointer begins at the last page of the document.

<?php

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

$document->getNumberImages(); //returns 2

var_dump($document->hasNextImage()); //returns false - remember, we're on the last page
var_dump($document->hasPreviousImage()); //returns true

?>

If you need to do more than generate thumbnails from a PDF, use XPDF: http://www.foolabs.com/xpdf/home.html
To Top