imagemagick

How to concatenate icons into a single image with ImageMagick?

I want to use CSS sprites on a web site instead of separate image files, for a large collection of small icons that are all the same size. How can I concatenate (tile) them into one big image using ImageMagick? ...

Fastest way to determine image resolution and file type in PHP or Unix command line?

I'm currently using ImageMagick to determine the resolution of images uploaded to the website. By calling ImageMagick's "identify" on the command line it takes about 0.42 seconds to determine a 1MB JPEG's resolution along with the fact that it's a JPEG. I find that a bit slow. Using the Imagick PHP library is even slower as it attemps t...

error installing RMagick from gem

Hello, Trying to install the RMagick gem is failing with an error about being unable to find ImageMagick libraries, even though I'm sure they are installed. The pertinent output from gem install rmagick is: checking for InitializeMagick() in -lMagick... no checking for InitializeMagick() in -lMagickCore... no checking for InitializeMa...

Installing RMagick on Mac OS X with MacPorts

With the MacPorts version of ImageMagick 6.4.4 installed, I'm getting an error installing the RMagick gem. /opt/local/bin/ruby extconf.rb update rmagick checking for Ruby version >= 1.8.2... yes checking for /usr/bin/gcc-4.0... yes checking for Magick-config... no Can't install RMagick 2.7.0. Can't find Magick-config in /System/Libr...

ImageMagick Reflection

Brief: convert ( -size 585x128 gradient: ) NewImage.png How do I change the above ImageMagick command so it takes the width and height from an existing image? I need it to remain a one line command. Details: I'm trying to programatically create an image reflection using ImageMagick. The effect I am looking for is similar to what ...

Finding blank areas of an image file using ImageMagick

I need to be able to determine if a part of an image (outside of predetermined crop marks) contains any image content. Is there a way with ImageMagick (specifically the php interface) to do this? Scenario: The canvas is 8.5x11 with .5 in margins on the top, left, and bottom edges and a 1 in margin on the right edge. The image needs to...

How do I add exif data to an image?

On our site, we get a large amount of photos uploaded from various sources. In order to keep the file sizes down, we strip all exif data from the source using mogrify: mogrify -strip image.jpg What we'd like to be able to do is to insert some basic exif data (Copyright Initrode, etc) back onto this new "clean" image, but I can't see...

BiCubic Shaper PHP Image Resize

Photoshop has that great: BiCube Shaper option for resizing. However I cannot find an equivalent. I've seen various code using GD that used imagecopyresampled and custom unsharp mask, but no where near the quality I am expecting. Any help? ...

How to pixelate/blur an image using ImageMagick?

I want to pixelate and/or blur an image. I've found the command for the blurring: $convert image.jpg -blur 18,5 newimage.jpg to work but I cannot blur the image any more. And how do I pixelate the image? I couldn't find a sound example around the net. Thx ...

Converting a PDF to a series of images with Python

I'm attempting to use Python to convert a multi-page PDF into a series of JPEGs. I can split the PDF up into individual pages easily enough with available tools, but I haven't been able to find anything that can covert PDFs to images. PIL does not work, as it can't read PDFs. The two options I've found are using either GhostScript or Im...

.NET: Replacing ImageMagick with WPF-objects

We've all seen cool WPF demo-applications with rich media. My question is if WPF-objects can replace some basic functionality in ImageMagick. Basic functions like resizing images, cropping and so on. The results from .NET 2.0's System.Graphics-namespace's resizing is just sad (GDI+). Maybe I'm using it wrong, but out of the box it seem...

Preferred library and/or method of converting CMYK to RGB

Each month I get new CMYK and RGB images that shall be used on the web. I had a script using a patched up ImageMagick doing this, but it got deleted. So I need to do it again, but it was hard last time. How do you easily and quickly convert CMYK image files to RGB? ...

How to set background color for transparent pixels in MagickWand?

When converting from PNG to JPG using the MagickWand API, how do I set the background to white for transparent pixels? ...

Using Stacks in ImageMagick to Selectively Blur Part of the Image

I'm trying to annotate some text onto a base image with a dropshadow. I don't like the results I get from using the -shadow option, so I'm putting down the text, blurring it, then putting down the text again in white, a few pixels offset from the shadow. Here's the command I'm using: convert base_image.jpg \ -font TT0590M_.ttf \...

How to set a background then create rounded corners using GD or ImageMagick?

The problem I have is quite simple, I'm hoping somebody with GD or ImageMagick experience can answer it. I have a source .gif (which may or may not have transparency). I want to set a background (a gradient, though specifics shouldn't matter), put the .gif on top of that, then round the corners. The rounded corner areas should be tran...

UTF-8 and X11 iso10646-1 fonts with ImageMagick

Trying to write UTF-8 text to an image without any luck. I've spent several hours reading docs and googling. /usr/bin/xlsfonts shows: ... -adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso10646-1 -adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1 ... (BTW, this seems like an excellent page for these fonts: http://www.cl...

g++ issue with Magick++ and cygwin

When I try to compile a simple c++ file using Magick++ and cygwin, I keep getting this result: $ g++ -o imageTest imageTest.cpp `GraphicsMagick++-config --cppflags --cxxflags --ldflags --libs` g++: unrecognized option `-no-undefined' /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -ldpstk collect2:...

What is the best package for generating dynamic graphs with PHP?

I have a strong need to start implementing database driven graphs on a couple of projects and the only library I have really played with is PEAR's Image_Graph. On the surface this seems fairly limited and like it may not be the best solution. I am going to need to generate both bar/pie charts, nothing overly fancy for the first cut. ...

using imagemagick or ghostscript (or something) to scale PDF to fit page?

I've been bashing my head against this to no avail. I need to shrink some large PDFs to print on an 8.5x11 inch (standard letter) page. Can imagemagick/ghostscript handle this sort of thing, or am I having so much trouble because I'm using the wrong tool for the job? Just relying on the 'shrink to page' option in client-side print dial...

Is it possible to use imagemagick as library reference from Adobe AIR?

I'm trying to load preview thumbnails of high resolution images and the application needs to be able to load 100 hi rez images at one time. The only way i know how to do this is if I use the Loader class and I have to load the ENTIRE file and then scale down the image and use the data as an image preview. what i'd like to do is use imag...