imagick

Creating two pdf pages with Imagick

Currently i can create PDF files from images in Imagick with this function $im->setImageFormat("pdf"); $im->writeImage("file.pdf"); And it's possible to fetch multiple pages with imagick like this $im = new imagick("file.pdf[0]"); $im2 = new imagick("file.pdf[1]"); But is it possible to save two image objects to two pages? (example...

Imagick Installation Errors - Class Undefined

Okay, Here's a breakdown of what's up: <? $foo = new Imagick(); ?> works without error when ran from the command-line (e.g., sudo php myscript.php However, when run via the web browswer I get Fatal error: Class 'Imagick' not found in /var/www/lhackwith_www/test_html/magic.php on line 1. magickwand is not installed extension=imagick.so...

Have GD get image from binary string

Hey everyone, Right now, I have a database that stores images in a MySQL BLOB field. I setup a script that selects and displays the images based on an ID in the URL, and I also made it so if you append ?resize=800x600, it would resize the image (in this case, to 800x600). For some dumb reason, the host that I use doesn't have Imagemagi...

Imagemagick thumbnail generation with php - using -crop

Hi there, Long ago I created a small library for resizing images using imagemagick through system(...) because I did not feel that the build-in imagemagick functions for PHP were sufficient. However, recently I had to port this to a symfony project and I chose to use sfThumbnailPlugin (if I remember correctly). This unfortunately didn'...

Using a transparent PNG as a clip mask

Is it possible to take this image: And apply this mask: And turn it into this: Using either GD or Imagick? I know it's possible to mask an image using shapes but I'm not sure how to go on about doing it with a pre-created alphatransparent image. :s ...

PHP iMagick image compression

Hi All, I'm fairly new to iMagick and have only found very limited documentation on the PHP library. I'm happily resizing images and writing them back to the hard drive, but I'm failing completely to compress the images using JPG for instance. This is the code I'm using so far function scale_image($size = 200,$extension) { if(!file_...

Limit number of threads in IMagick (PHP)

When using ImageMagick, I can set certain limits for memory usage and maximum number of threads. There are 3 ways to do this, as far as I know: use a command line options like "convert -limit memory 128mb original.jpg new.jpg" use environment variables like "MAGICK_THREAD_LIMIT=1" edit the 'policy.xml' configuration file to change the ...

How do I remove EXIF tags while preserving the ICC color profile?

I am programmatically generating several sizes of thumbnails for images. I need to preserve the color space of an image while removing all (other) EXIF information. I am using imagick on PHP 5.3, but information on how to do this with any imagemagick API would be helpful. I'm trying to prune the file size of my image thumbnails as muc...

How to use Imagick php to generate a bmp file with a palette offset

I'm trying to use Imagick via php to generate a 8bit bmp from jpg. But i would like the pixel colors to start at index 16 rather than 0. The code below shows how to generate the bmp in the correct format i need, but the palette index defaults to 0. Is there a way to make sure the palette start at another index? $average = new Imag...

How do I process jpg files using ImageMagick (IMagick API)? I am getting an exception, NoDecodeDelegateForThisImageFormat, whenver I try.

I am using ImageMagick with the PHP IMagick API to process uploaded jpg files - however, when I try to read a Blob or even read a physical file, I get the exception, NoDecodeDelegateForThisImageFormat An example of the code I am using is below - private function resizeImageBlob($blob, $width, $height) { $image = new Imagick(); ...

imagick showing script url instead of image

Hi, currently i'm trying to use imagick to generate some images without saving them on the server and then outputting to the browser, my method of choice was image magic with the imagick extension for php. I read the documentation, and i'm sure the package is installed on my machine (windows xp, with xampp). the class is installed imag...

[ PHP - Image Magic / GD ] How to change the background black color to transparent?

Hello, I am rotating an image using Image Magick (as PHP-GD scales down image). But it leaves the background to be black. Also, the image doesn't look good at all(but better than PHP-GD). Any suggestions? @oren , @razzed Here's the code $patchImageS = 'kapeels.png'; // the image to be patched over the final bg $imagick ...

ImagickDraw::setFont has no effect on my system; suggestions?

Running on Ubuntu LTS 8.04, PHP 5.2.8, ImageMagick 6.6.1-5 installed from source, and Imagick 2.3.0 installed from pecl. ImageMagick's 'convert' command sets fonts properly, and ImagickDraw::setFont properly complains if an invalid path to a font has been specified. However, specifying a valid font has no effect in changing the appeara...

imagick setFontStyle() error

Hi, i'm currently trying to create an image with some text, the whole text and some options being dynamic. I've got it working to the point that the font used and the font size is dependent on input from the users, but when i tried changing the font style... well.. that's when it all got downhill.The code that generates the image is this...

Imagick PHP Extension -- Montage help?

Hello all, I've been having some trouble generating an image with the Imagick PHP extension. Everything works fine, except my following "montage" has a white background and therefore I cannot overlay it on top of something else. How can I generate a montage with a transparent background? $Montage = $Icons->montageImage(new imagic...

Imagick: gifs, and background color

Hi, I have 2 questions about using the php imagick class that I can't get working properly... 1.) I tried resizing / cropping a gif, and treated it as a normal image. It seemed to work, except that a few frames in the middle of the animation contained a small patch of artifacts. Is there a setting that should be used when working with m...

php,unix command ,imagick ,overflow

This is Add text to image echo system('convert mug.jpg -font courier -fill green -pointsize 30 -annotate +100+230 \'hi Wlecome yy\' mug123.jpg'); unix command run in php it is working fine when we change the point size hi welcome is over flow the image how can we over come? ...

Calling "other" ImageMagick commands through Imagick?

Hi, I'm using the Imagick PHP wrapper for ImageMagick. I've noticed there are some ImageMagick commands that are not available in the Imagick wrapper, such as autolevel and normalize. How should I go about calling these? Couldn't find anything in Imagick. Are there disadvantages to calling the ImageMagick commands directly through the ...

Set a color as transparent in palette-based image

Hello there! I want to convert a alpha transparent png image to palette based png image. In GD I can do it easy: // We have already the image loaded in $source_img $w=200; $h=200; // We supose that img dimensions are 200x200 $img = imagecreatetruecolor($w, $h); // New black image list($r, $g, $b) = array(200, 200, 200)...

Which PHP image processing library is more powerful,imagick or gd?

And the reason? ...