imagemagick

Lossless merging of PDFs (PHP)

Currently I am using ImageMagick to merge multiple PDFs into one in a PHP script on my Linux system. However, the resulting PDFs are of very low quality. I have stumbled across pdftk which seems to have a better quality after the merging, but I need to use ImageMagick if possible because I need to get the script to run on another server ...

Converting pdf to images using Ruby/JRuby

I'm looking for an easy way to generate previews for labels generated as pdfs. It would be great if I could convert these pdfs to images and show them to the user before the actual print/download. The application is currently running in a Jruby on rails environment, but it's quite possible that we switch to two applications, one running...

How can I resize an image to fit area with Image::Magick?

From command line with imagemagick, you can use: convert dragon.gif -resize 64x64^ -gravity center -extent 64x64 fill_crop_dragon.gif to resize and then crop an image so that it fills the area as much as possible. How do I do this from Perl's Image::Magick? ...

How can I use IO::Scalar with Image::Magick::Read()?

I have an image I have manipulated with GD::Image and I want to do further manipulations with Image::Magick. I'd like to avoid writing the image out to disk just so Image::Magick can read it in. Image::Magick's Read function will accept a filehandle as a parameter, so I'm trying to pass it an IO::Scalar object I created with the output...

How to install ImageMagick on MAMP?

I'm running OSX Leopard with MAMP (a sandbox consisting of Apache/MySQL/PHP). I installed ImageMagick using MacPorts by following this tutorial: http://www.brybot.ca/archives/getting-imagemagick-and-more-to-work-with-mamp-on-os-x/ Then I added extension=imagick.so to the php.ini But PHP won't recognize it. It keeps telling me: Fatal e...

Which EXIF tag to store keyword/tag for a photo?

I am developing a photo gallery which will read/write EXIF tags. I will put photo title in the EXIF tag DocumentName and description in EXIF tag ImageDescription. I also plan to use the geo-tags. But what about photo tags/categories? I want to store a space-separated string of the tags a photo is tagged with in my system. Is there any EX...

What are the odds of GD or ImageMagick already being part of a client's PHP install?

I'm working on a package which includes rescaling of images in PHP. For image rescaling, PHP has the GD and ImageMagick libraries. Are those likely to be part of a given client's PHP install already? Is there a "default" install of PHP, for that matter? By default, are either GD or ImageMagick included? If neither is installed, should ...

Why is calling (ImageMagick) convert.exe from PHP script resulting in an unresponsive page?

* This is now resolved * by clearing the temp folder in windows! Some info - Windows 2003 server, IIS 6 ImageMagick 6.3.3 PHP 5.2.0 I am using ImageMagick to resize images on the server and I think this has recently been causing problems. What I am noticing is that when my PHP script executes the ImageMagick command the webpage freeze...

Crop or mask an image into a circle

What is the best way to crop or mask an image into a circular shape, using either ImageMagick or GD libraries? (Note, solution exists on "other" Q&A sites, but not StackOverflow) ...

Generate Thumbnails with PHP for a wide range of file formats

Hi All I have had a client request on a upload facility for his clients, but after upload that a image thumbnail to be created. All normal images are ok but he his talking about .psd, .pdf, .eps, .ppt Having a good look around I think wih imagemagick & ghostscript will cater for most of these but I cant find a solution of PPT or EPS. ...

Running a batch with imagemagick

I need to save a bunch (several thousand) of images with imagemagick. I'm totally new to it, and its documentation seems totally opaque and totally labyrinth. Where's the quickstart guide? Looking at it, I think I want to use mogrify. so I cd to my program files directory where I installed imagemagick. I run mogrify -format png *.pn...

ImageMagickError unable to read font `(null)': `(null)'

I've been getting this error for a while on my production server (Ubuntu running ImageMagick, Rmagick, etc). From Googling around it seems to be not finding the right fonts to use, and this needs to be set correctly in sudo nano /usr/lib/ImageMagick-6.3.7/config/type-ghostscript.xml When I open up this file it lists a bunch of fonts...

ImageMagick: convert png fail via PHP and works via bash shell

I've got a very weird bug which I've yet to find a solution. UPDATE see solution below What I am trying to do is convert a full size picture into a 160x120 thumbnail. It works great with jpg and jpeg files of any size, but not with png. ImageMagick command: /opt/local/bin/convert '/WEBSERVER/images/img_0003-192-10.png' -thumbnail x32...

Drawing pies using PHP ImageMagick

Is there a way to get GD's function imagefilledarc()'s result in using PHP ImageMagick? I've looked around but haven't found a satisfying solution so far. I want it to support transparency, and use it to draw pies. ...

Converting hebrew text to an image using imagemagick

Hi, I need to convert text to an image. Using imagemagick I can get this done. However, part or all of the text could be in Hebrew (an RTL language). This means the words in Hebrew are rendered backwards. If I was assured that the text was only Hebrew, I would have just reversed the text before sending it to ImageMagick. However, this so...

How is a sepia tone created?

What are the basic operations needed to create a sepia tone? My reference point is the perl imagemagick library, so I can easily use any basic operation. I've tried to quantize (making it grayscale), colorize, and then enhance the image but it's still a bit blurry. ...

Simulate Photoshop's saturation changes in Imagemagick

In Photoshop you can adjust the hue, saturation and lightness of an image with three sliders. ImageMagick you can modulate the brightness, saturation, and hue. Minimizing the saturation correctly produces a black and white image in both programs. Maxing out the saturation appears close, but ImageMagick appears to soften some of the blo...

How to remove profiles with MagickNet

I am new to ImageMagick and I am using MagickNet. With ImageMagick, I could use option -strip or -profile '*' with convert command to remove profiles. And in MagickNet, I found some properties and functions releated to profiles, such as EXIFProfile, set_Profile. To remove profiles, I used them like this: // to remove profiles fro...

Trouble with linking ImageMagick libraries using MinGw on Windows

I started using Qt Creator recently and it seems to work well. A sample application I build on OS X uses the ImageMagick library. No problems there - everything works as expected. I built the ImageMagick libraries from source. Now I move over to the Windows side and the linking troubles start. Qt Creator on Windows uses MinGW and not t...

Strange issue -- PHP / ImageMagick / Ghostscript

Hi All, This question was close, but doesn't do the trick. I am trying to convert a pdf into a jpg (for thumbnailing). Here is the command I am running: convert -quality 100 -density 200x200 /path/file.pdf /path/file.jpg I have mamp pro 1.7.2,imagemagick, ghostscript all properly installed and working. This command works perfectly fr...