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. :)
The Imagick class
Class synopsis
bool adaptiveBlurImage
( float $radius
, float $sigma
[, int $channel = Imagick::CHANNEL_DEFAULT
] )
bool adaptiveSharpenImage
( float $radius
, float $sigma
[, int $channel = Imagick::CHANNEL_DEFAULT
] )
bool annotateImage
( ImagickDraw $draw_settings
, float $x
, float $y
, float $angle
, string $text
)
bool compositeImage
( Imagick $composite_object
, int $composite
, int $x
, int $y
[, int $channel = Imagick::CHANNEL_ALL
] )
bool contrastStretchImage
( float $black_point
, float $white_point
[, int $channel = Imagick::CHANNEL_ALL
] )
public array exportImagePixels
( int $x
, int $y
, int $width
, int $height
, string $map
, int $STORAGE
)
bool floodFillPaintImage
( mixed $fill
, float $fuzz
, mixed $target
, int $x
, int $y
, bool $invert
[, int $channel = Imagick::CHANNEL_DEFAULT
] )
bool frameImage
( mixed $matte_color
, int $width
, int $height
, int $inner_bevel
, int $outer_bevel
)
public bool functionImage
( int $function
, array $arguments
[, int $channel = Imagick::CHANNEL_DEFAULT
] )
float getImageChannelDistortions
( Imagick $reference
, int $metric
[, int $channel = Imagick::CHANNEL_DEFAULT
] )
public bool importImagePixels
( int $x
, int $y
, int $width
, int $height
, string $map
, int $storage
, array $pixels
)
bool levelImage
( float $blackPoint
, float $gamma
, float $whitePoint
[, int $channel = Imagick::CHANNEL_ALL
] )
Imagick montageImage
( ImagickDraw $draw
, string $tile_geometry
, string $thumbnail_geometry
, int $mode
, string $frame
)
bool motionBlurImage
( float $radius
, float $sigma
, float $angle
[, int $channel = Imagick::CHANNEL_DEFAULT
] )
bool opaquePaintImage
( mixed $target
, mixed $fill
, float $fuzz
, bool $invert
[, int $channel = Imagick::CHANNEL_DEFAULT
] )
bool paintFloodfillImage
( mixed $fill
, float $fuzz
, mixed $bordercolor
, int $x
, int $y
[, int $channel = Imagick::CHANNEL_ALL
] )
bool paintOpaqueImage
( mixed $target
, mixed $fill
, float $fuzz
[, int $channel = Imagick::CHANNEL_ALL
] )
bool quantizeImage
( int $numberColors
, int $colorspace
, int $treedepth
, bool $dither
, bool $measureError
)
bool quantizeImages
( int $numberColors
, int $colorspace
, int $treedepth
, bool $dither
, bool $measureError
)
bool resizeImage
( int $columns
, int $rows
, int $filter
, float $blur
[, bool $bestfit = false
] )
bool roundCorners
( float $x_rounding
, float $y_rounding
[, float $stroke_width = 10
[, float $displace = 5
[, float $size_correction = -6
]]] )
public bool segmentImage
( int $COLORSPACE
, float $cluster_threshold
, float $smooth_threshold
[, bool $verbose = false
] )
bool sigmoidalContrastImage
( bool $sharpen
, float $alpha
, float $beta
[, int $channel = Imagick::CHANNEL_ALL
] )
public bool sparseColorImage
( int $SPARSE_METHOD
, array $arguments
[, int $channel = Imagick::CHANNEL_DEFAULT
] )
bool unsharpMaskImage
( float $radius
, float $sigma
, float $amount
, float $threshold
[, int $channel = Imagick::CHANNEL_ALL
] )
}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:
Table of Contents
- Imagick::adaptiveBlurImage — اضافه کردن فیلتر blur دارای قابیت تطبیق به تصویر
- Imagick::adaptiveResizeImage — Adaptively resize image with data dependent triangulation
- Imagick::adaptiveSharpenImage — Adaptively sharpen the image
- Imagick::adaptiveThresholdImage — Selects a threshold for each pixel based on a range of intensity
- Imagick::addImage — Adds new image to Imagick object image list
- Imagick::addNoiseImage — Adds random noise to the image
- Imagick::affineTransformImage — Transforms an image
- Imagick::animateImages — Animates an image or images
- Imagick::annotateImage — Annotates an image with text
- Imagick::appendImages — Append a set of images
- Imagick::averageImages — متوسط مجموعه تصاویر
- Imagick::blackThresholdImage — Forces all pixels below the threshold into black
- Imagick::blurImage — Adds blur filter to image
- Imagick::borderImage — Surrounds the image with a border
- Imagick::charcoalImage — Simulates a charcoal drawing
- Imagick::chopImage — Removes a region of an image and trims
- Imagick::clear — پاک کردن تمام منابع مرتبط به شی Imagick
- Imagick::clipImage — Clips along the first path from the 8BIM profile
- Imagick::clipPathImage — Clips along the named paths from the 8BIM profile
- Imagick::clone — Makes an exact copy of the Imagick object
- Imagick::clutImage — Replaces colors in the image
- Imagick::coalesceImages — Composites a set of images
- Imagick::colorFloodfillImage — Changes the color value of any pixel that matches target
- Imagick::colorizeImage — آمیختن رنگ پر کردن با تصویر
- Imagick::combineImages — Combines one or more images into a single image
- Imagick::commentImage — Adds a comment to your image
- Imagick::compareImageChannels — Returns the difference in one or more images
- Imagick::compareImageLayers — بازگرداندن بیشترین ناحیه محدود بین تصاویر
- Imagick::compareImages — مقایسه تصویر با تصویر بازسازی شده
- Imagick::compositeImage — ترکیب تصویری در تصویر دیگر
- Imagick::__construct — سازنده Imagick
- Imagick::contrastImage — تغییر کنتراست تصویر
- Imagick::contrastStretchImage — Enhances the contrast of a color image
- Imagick::convolveImage — Applies a custom convolution kernel to the image
- Imagick::cropImage — Extracts a region of the image
- Imagick::cropThumbnailImage — Creates a crop thumbnail
- Imagick::current — Returns a reference to the current Imagick object
- Imagick::cycleColormapImage — Displaces an image's colormap
- Imagick::decipherImage — رمزگشایی تصویر
- Imagick::deconstructImages — بازگرداندن تفاوت پیکسل مشخص بین تصاویر
- Imagick::deleteImageArtifact — Delete image artifact
- Imagick::deskewImage — Removes skew from the image
- Imagick::despeckleImage — Reduces the speckle noise in an image
- Imagick::destroy — Destroys the Imagick object
- Imagick::displayImage — Displays an image
- Imagick::displayImages — Displays an image or image sequence
- Imagick::distortImage — Distorts an image using various distortion methods
- Imagick::drawImage — پردازش شی ImagickDraw در تصویر فعلی
- Imagick::edgeImage — Enhance edges within the image
- Imagick::embossImage — Returns a grayscale image with a three-dimensional effect
- Imagick::encipherImage — Enciphers an image
- Imagick::enhanceImage — Improves the quality of a noisy image
- Imagick::equalizeImage — Equalizes the image histogram
- Imagick::evaluateImage — Applies an expression to an image
- Imagick::exportImagePixels — Exports raw image pixels
- Imagick::extentImage — تعیین اندازه تصویر
- Imagick::flattenImages — ادغام توالی تصویرها
- Imagick::flipImage — ساخت تصویر آینهای عمودی
- Imagick::floodFillPaintImage — Changes the color value of any pixel that matches target
- Imagick::flopImage — Creates a horizontal mirror image
- Imagick::frameImage — Adds a simulated three-dimensional border
- Imagick::functionImage — Applies a function on the image
- Imagick::fxImage — Evaluate expression for each pixel in the image
- Imagick::gammaImage — Gamma-corrects an image
- Imagick::gaussianBlurImage — Blurs an image
- Imagick::getColorspace — Gets the colorspace
- Imagick::getCompression — دریافت نوع فشردهسازی شی
- Imagick::getCompressionQuality — Gets the object compression quality
- Imagick::getCopyright — بازگرداندن حقوق نشر ImageMagick API به عنوان رشته
- Imagick::getFilename — filename مرتبط با توالی تصویر
- Imagick::getFont — دریافت فونت
- Imagick::getFormat — Returns the format of the Imagick object
- Imagick::getGravity — Gets the gravity
- Imagick::getHomeURL — Returns the ImageMagick home URL
- Imagick::getImage — بازگرداندن شی جدید Imagick
- Imagick::getImageAlphaChannel — Gets the image alpha channel
- Imagick::getImageArtifact — Get image artifact
- Imagick::getImageBackgroundColor — بازگرداندن رنگ پیشزمینه تصویر
- Imagick::getImageBlob — Returns the image sequence as a blob
- Imagick::getImageBluePrimary — Returns the chromaticy blue primary point
- Imagick::getImageBorderColor — Returns the image border color
- Imagick::getImageChannelDepth — Gets the depth for a particular image channel
- Imagick::getImageChannelDistortion — Compares image channels of an image to a reconstructed image
- Imagick::getImageChannelDistortions — Gets channel distortions
- Imagick::getImageChannelExtrema — Gets the extrema for one or more image channels
- Imagick::getImageChannelKurtosis — هدف getImageChannelKurtosis
- Imagick::getImageChannelMean — Gets the mean and standard deviation
- Imagick::getImageChannelRange — دریافت بازه کانال
- Imagick::getImageChannelStatistics — Returns statistics for each channel in the image
- Imagick::getImageClipMask — Gets image clip mask
- Imagick::getImageColormapColor — Returns the color of the specified colormap index
- Imagick::getImageColors — Gets the number of unique colors in the image
- Imagick::getImageColorspace — Gets the image colorspace
- Imagick::getImageCompose — Returns the composite operator associated with the image
- Imagick::getImageCompression — Gets the current image's compression type
- Imagick::getImageCompressionQuality — Gets the current image's compression quality
- Imagick::getImageDelay — Gets the image delay
- Imagick::getImageDepth — Gets the image depth
- Imagick::getImageDispose — Gets the image disposal method
- Imagick::getImageDistortion — مقایسه تصویر با تصویر بازسازیشده
- Imagick::getImageExtrema — دریافت extrema تصویر
- Imagick::getImageFilename — بازگرداندن filename تصویر به خصوص در توالی
- Imagick::getImageFormat — بازگرداندن قالب تصویر به خصوص در توالی
- Imagick::getImageGamma — Gets the image gamma
- Imagick::getImageGeometry — Gets the width and height as an associative array
- Imagick::getImageGravity — Gets the image gravity
- Imagick::getImageGreenPrimary — Returns the chromaticy green primary point
- Imagick::getImageHeight — Returns the image height
- Imagick::getImageHistogram — Gets the image histogram
- Imagick::getImageIndex — Gets the index of the current active image
- Imagick::getImageInterlaceScheme — Gets the image interlace scheme
- Imagick::getImageInterpolateMethod — Returns the interpolation method
- Imagick::getImageIterations — Gets the image iterations
- Imagick::getImageLength — بازگرداندن طول تصویر به بایت
- Imagick::getImageMagickLicense — بازگرداندن رشته شامل مجوز ImageMagick
- Imagick::getImageMatte — بازگرداندن وجود کانال مات تصویر
- Imagick::getImageMatteColor — بازگرداندن رنگ مات تصویر
- Imagick::getImageOrientation — دریافت جهت تصویر
- Imagick::getImagePage — بازگرداندن هندسه تصویر
- Imagick::getImagePixelColor — بازگرداندن رنگ پیکسل مشخص
- Imagick::getImageProfile — بازگرداندن پروفایل تصویر نامدار
- Imagick::getImageProfiles — Returns the image profiles
- Imagick::getImageProperties — Returns the image properties
- Imagick::getImageProperty — Returns the named image property
- Imagick::getImageRedPrimary — Returns the chromaticity red primary point
- Imagick::getImageRegion — Extracts a region of the image
- Imagick::getImageRenderingIntent — Gets the image rendering intent
- Imagick::getImageResolution — Gets the image X and Y resolution
- Imagick::getImagesBlob — Returns all image sequences as a blob
- Imagick::getImageScene — Gets the image scene
- Imagick::getImageSignature — Generates an SHA-256 message digest
- Imagick::getImageSize — Returns the image length in bytes
- Imagick::getImageTicksPerSecond — Gets the image ticks-per-second
- Imagick::getImageTotalInkDensity — Gets the image total ink density
- Imagick::getImageType — Gets the potential image type
- Imagick::getImageUnits — Gets the image units of resolution
- Imagick::getImageVirtualPixelMethod — Returns the virtual pixel method
- Imagick::getImageWhitePoint — Returns the chromaticity white point
- Imagick::getImageWidth — Returns the image width
- Imagick::getInterlaceScheme — Gets the object interlace scheme
- Imagick::getIteratorIndex — Gets the index of the current active image
- Imagick::getNumberImages — Returns the number of images in the object
- Imagick::getOption — Returns a value associated with the specified key
- Imagick::getPackageName — Returns the ImageMagick package name
- Imagick::getPage — Returns the page geometry
- Imagick::getPixelIterator — Returns a MagickPixelIterator
- Imagick::getPixelRegionIterator — Get an ImagickPixelIterator for an image section
- Imagick::getPointSize — Gets point size
- Imagick::getQuantumDepth — Gets the quantum depth
- Imagick::getQuantumRange — Returns the Imagick quantum range
- Imagick::getReleaseDate — Returns the ImageMagick release date
- Imagick::getResource — Returns the specified resource's memory usage
- Imagick::getResourceLimit — Returns the specified resource limit
- Imagick::getSamplingFactors — Gets the horizontal and vertical sampling factor
- Imagick::getSize — Returns the size associated with the Imagick object
- Imagick::getSizeOffset — Returns the size offset
- Imagick::getVersion — Returns the ImageMagick API version
- Imagick::haldClutImage — Replaces colors in the image
- Imagick::hasNextImage — Checks if the object has more images
- Imagick::hasPreviousImage — Checks if the object has a previous image
- Imagick::identifyImage — Identifies an image and fetches attributes
- Imagick::implodeImage — Creates a new image as a copy
- Imagick::importImagePixels — Imports image pixels
- Imagick::labelImage — Adds a label to an image
- Imagick::levelImage — Adjusts the levels of an image
- Imagick::linearStretchImage — Stretches with saturation the image intensity
- Imagick::liquidRescaleImage — Animates an image or images
- Imagick::magnifyImage — Scales an image proportionally 2x
- Imagick::mapImage — جایگزینی رنگهای تصویر با نزدیکترین تصویر مرجع
- Imagick::matteFloodfillImage — Changes the transparency value of a color
- Imagick::medianFilterImage — Applies a digital filter
- Imagick::mergeImageLayers — Merges image layers
- Imagick::minifyImage — Scales an image proportionally to half its size
- Imagick::modulateImage — Control the brightness, saturation, and hue
- Imagick::montageImage — Creates a composite image
- Imagick::morphImages — Method morphs a set of images
- Imagick::mosaicImages — Forms a mosaic from images
- Imagick::motionBlurImage — Simulates motion blur
- Imagick::negateImage — Negates the colors in the reference image
- Imagick::newImage — Creates a new image
- Imagick::newPseudoImage — Creates a new image
- Imagick::nextImage — Moves to the next image
- Imagick::normalizeImage — Enhances the contrast of a color image
- Imagick::oilPaintImage — Simulates an oil painting
- Imagick::opaquePaintImage — Changes the color value of any pixel that matches target
- Imagick::optimizeImageLayers — Removes repeated portions of images to optimize
- Imagick::orderedPosterizeImage — Performs an ordered dither
- Imagick::paintFloodfillImage — Changes the color value of any pixel that matches target
- Imagick::paintOpaqueImage — Change any pixel that matches color
- Imagick::paintTransparentImage — Changes any pixel that matches color with the color defined by fill
- Imagick::pingImage — Fetch basic attributes about the image
- Imagick::pingImageBlob — Quickly fetch attributes
- Imagick::pingImageFile — Get basic image attributes in a lightweight manner
- Imagick::polaroidImage — Simulates a Polaroid picture
- Imagick::posterizeImage — Reduces the image to a limited number of color level
- Imagick::previewImages — Quickly pin-point appropriate parameters for image processing
- Imagick::previousImage — Move to the previous image in the object
- Imagick::profileImage — Adds or removes a profile from an image
- Imagick::quantizeImage — Analyzes the colors within a reference image
- Imagick::quantizeImages — Analyzes the colors within a sequence of images
- Imagick::queryFontMetrics — Returns an array representing the font metrics
- Imagick::queryFonts — Returns the configured fonts
- Imagick::queryFormats — Returns formats supported by Imagick
- Imagick::radialBlurImage — Radial blurs an image
- Imagick::raiseImage — Creates a simulated 3d button-like effect
- Imagick::randomThresholdImage — Creates a high-contrast, two-color image
- Imagick::readImage — Reads image from filename
- Imagick::readImageBlob — Reads image from a binary string
- Imagick::readImageFile — Reads image from open filehandle
- Imagick::recolorImage — Recolors image
- Imagick::reduceNoiseImage — Smooths the contours of an image
- Imagick::remapImage — Remaps image colors
- Imagick::removeImage — Removes an image from the image list
- Imagick::removeImageProfile — Removes the named image profile and returns it
- Imagick::render — Renders all preceding drawing commands
- Imagick::resampleImage — نمونهسازی دوباره تصویر با دقت خواسته شده
- Imagick::resetImagePage — بازنشانی صفحه تصویر
- Imagick::resizeImage — Scales an image
- Imagick::rollImage — آفست تصویر
- Imagick::rotateImage — Rotates an image
- Imagick::roundCorners — Rounds image corners
- Imagick::sampleImage — Scales an image with pixel sampling
- Imagick::scaleImage — Scales the size of an image
- Imagick::segmentImage — Segments an image
- Imagick::separateImageChannel — Separates a channel from the image
- Imagick::sepiaToneImage — Sepia tones an image
- Imagick::setBackgroundColor — تعیین رنگ پیشزمینه پیشفرض شی
- Imagick::setColorspace — Set colorspace
- Imagick::setCompression — تعیین نوع فشردهسازی پیشفرض
- Imagick::setCompressionQuality — تعیین کیفیت فشردهسازی پیشفرض شی
- Imagick::setFilename — تعیین نام فایل پیش از خواندن یا نوشتن فایل تصویر
- Imagick::setFirstIterator — تعیین تکرارکننده Imagick برای اولین تصویر
- Imagick::setFont — Sets font
- Imagick::setFormat — تعیین قالب شی Imagick
- Imagick::setGravity — Sets the gravity
- Imagick::setImage — Replaces image in the object
- Imagick::setImageAlphaChannel — Sets image alpha channel
- Imagick::setImageArtifact — Set image artifact
- Imagick::setImageBackgroundColor — Sets the image background color
- Imagick::setImageBias — Sets the image bias for any method that convolves an image
- Imagick::setImageBluePrimary — Sets the image chromaticity blue primary point
- Imagick::setImageBorderColor — Sets the image border color
- Imagick::setImageChannelDepth — Sets the depth of a particular image channel
- Imagick::setImageClipMask — Sets image clip mask
- Imagick::setImageColormapColor — تعیین رنگ اندیش colormap مشخص
- Imagick::setImageColorspace — تعیین colorspace تصویر
- Imagick::setImageCompose — Sets the image composite operator
- Imagick::setImageCompression — تعیین فشردهسازی توصیر
- Imagick::setImageCompressionQuality — تعیین کیفیت فشردهسازی تصویر
- Imagick::setImageDelay — تعیین تاخیر تصویر
- Imagick::setImageDepth — تعیین عمق تصویر
- Imagick::setImageDispose — تعیین روش حذف تصویر
- Imagick::setImageExtent — تعیین اندازه تصویر
- Imagick::setImageFilename — تعیین filename تصویر مشخص
- Imagick::setImageFormat — تعیین قالب تصویر مشخص
- Imagick::setImageGamma — تعیین گامای تصویر
- Imagick::setImageGravity — Sets the image gravity
- Imagick::setImageGreenPrimary — تعیین نقطه اصلی سبز تصویر
- Imagick::setImageIndex — Set the iterator position
- Imagick::setImageInterlaceScheme — تعیین فشردهسازی تصویر
- Imagick::setImageInterpolateMethod — Sets the image interpolate pixel method
- Imagick::setImageIterations — تعیین تکرار تصویر
- Imagick::setImageMatte — Sets the image matte channel
- Imagick::setImageMatteColor — Sets the image matte color
- Imagick::setImageOpacity — Sets the image opacity level
- Imagick::setImageOrientation — Sets the image orientation
- Imagick::setImagePage — Sets the page geometry of the image
- Imagick::setImageProfile — Adds a named profile to the Imagick object
- Imagick::setImageProperty — Sets an image property
- Imagick::setImageRedPrimary — Sets the image chromaticity red primary point
- Imagick::setImageRenderingIntent — Sets the image rendering intent
- Imagick::setImageResolution — Sets the image resolution
- Imagick::setImageScene — Sets the image scene
- Imagick::setImageTicksPerSecond — Sets the image ticks-per-second
- Imagick::setImageType — Sets the image type
- Imagick::setImageUnits — Sets the image units of resolution
- Imagick::setImageVirtualPixelMethod — Sets the image virtual pixel method
- Imagick::setImageWhitePoint — Sets the image chromaticity white point
- Imagick::setInterlaceScheme — Sets the image compression
- Imagick::setIteratorIndex — Set the iterator position
- Imagick::setLastIterator — Sets the Imagick iterator to the last image
- Imagick::setOption — Set an option
- Imagick::setPage — تعیین هندسه صفحه شی Imagick
- Imagick::setPointSize — Sets point size
- Imagick::setResolution — Sets the image resolution
- Imagick::setResourceLimit — Sets the limit for a particular resource in megabytes
- Imagick::setSamplingFactors — Sets the image sampling factors
- Imagick::setSize — Sets the size of the Imagick object
- Imagick::setSizeOffset — Sets the size and offset of the Imagick object
- Imagick::setType — Sets the image type attribute
- Imagick::shadeImage — Creates a 3D effect
- Imagick::shadowImage — Simulates an image shadow
- Imagick::sharpenImage — Sharpens an image
- Imagick::shaveImage — Shaves pixels from the image edges
- Imagick::shearImage — Creating a parallelogram
- Imagick::sigmoidalContrastImage — Adjusts the contrast of an image
- Imagick::sketchImage — Simulates a pencil sketch
- Imagick::solarizeImage — Applies a solarizing effect to the image
- Imagick::sparseColorImage — Interpolates colors
- Imagick::spliceImage — Splices a solid color into the image
- Imagick::spreadImage — Randomly displaces each pixel in a block
- Imagick::steganoImage — Hides a digital watermark within the image
- Imagick::stereoImage — مخلوط کردن تصاویر
- Imagick::stripImage — حذف تصویر تمام پروفایلها و توضیحات
- Imagick::swirlImage — Swirls the pixels about the center of the image
- Imagick::textureImage — کاشیبندی بافت تصویر به صورت تکراری
- Imagick::thresholdImage — تغییر مقدار تک پیکسل بر مبنای آستانه
- Imagick::thumbnailImage — Changes the size of an image
- Imagick::tintImage — Applies a color vector to each pixel in the image
- Imagick::transformImage — روش آسان برای تنظیم اندازه برش و هندسه تصویر
- Imagick::transparentPaintImage — نقاشی پیکسلهای شفاف
- Imagick::transposeImage — ساخت تصویر آینهای عمودی
- Imagick::transverseImage — ساخت تصویر آینهای افقی
- Imagick::trimImage — حذف لبهها از تصویر
- Imagick::uniqueImageColors — حذف تمام رنگها به جز یک رنگ پیکسل
- Imagick::unsharpMaskImage — تند کردن تصویر
- Imagick::valid — بررسی صحت مورد فعلی
- Imagick::vignetteImage — اضافه کردن فیلتر vignette به تصویر
- Imagick::waveImage — به کار بردن فیلتر موج به تصویر
- Imagick::whiteThresholdImage — تمام پیکسلهای بالاتر از آستانه را سفید میکند
- Imagick::writeImage — نوشتن تصویر به filename مشخص
- Imagick::writeImageFile — نوشتن تصویر به filehandle
- Imagick::writeImages — نوشتن تصویر به توالی تصاویر
- Imagick::writeImagesFile — نوشتن فریمها به filehandle
StealthFox at live dot com ¶
4 years ago
benkuhl at gmail dot com ¶
3 months 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
php at mattjanssen dot com ¶
2 years ago
You can find the documentation for all of these magick_wand--the interface Imagic seems to be built on--functions at http://www.graphicsmagick.org/wand/magick_wand.html
Anonymous ¶
2 years ago
Simply echo the Imagick object to output it to the browser.
Remember to use setImageFormat() and header('Content-type: image/png')
martijn at elicit dot nl ¶
3 years ago
In case you are wondering why the function imageGrayscale() doesn't exist ... it's because imageModulate(100,0,100) does the trick already!
<?php
$f = 'enter filename here';
$i = new Imagick($f);
$i->imageModulate(100,0,100);
header('Content-type: image/jpeg');
echo $i;
?>
