imagemagick

Portable version of ImageMagick to package with my app?

I've built a Content Management System application in CakePHP which I've utilised ImageMagick for transforming uploaded images and PDF files. The biggest problem I've found with using ImageMagick is when I come to deploy the application on someone else's hosting. Their server either doesn't have IM installed, or it's version 6.2.8 and ...

Imagemagick not working regarding php?

Hello all; I have installed Imagemagick for (winxp) and is ok, and for working regarding resize with php code i have done a step by step procedure as a comment on php.net like below: Ultimater at gmail dot com. 28-Jul-2009 02:41 Installing Imagick on Windows isn't too hard. I followed the guide at http://valokuva.org/?page%5Fid=50 a...

Small question regarding Imagemagick ($im = new Imagick( "strawberry.png" )?

Hi all, I have a piece of codes that resizes a .png file in php. It start with: $im = new Imagick( "strawberry.png" ); I have a .png file in www.mydomain.com\test\strawberry.png. How can I correct the code above for this address? Thanks ...

ImageMagick failing to convert to JPG

Hi: We recently installed the latest version of ImageMagick onto our Linux server. I seem to be having issues performing the most basic of tasks. I am running this command line: /usr/bin/convert /location/to/source/design.ai /location/to/save/output.jpg Unfortunatly is saves design.jpg as an illustrator file (if I rename the file to...

Use ImageMagick to place an image inside a larger canvas

Getting started with ImageMagic and trying to find a way to do this... If an image is less than 50 pixels tall or 50 pixels wide, I'd like to place it (un-scaled) in the horizontal/vertical center of a new 50x50 pixel canvas on top of a white background - and save that as the new image. Anyone know if this is possible with ImageMagick? ...

How do you convert an SVG image "paths" into separate PNG images?

Hi there, I've got an SVG image with 67 separate paths. Are there any libraries/tutorials out there that will create a separate raster image such as a PNG for each of those paths, and perhaps name them according to the path id? ...

How to create semi-transparent image using imagemagick

I have a hex (i.e. #FF0000) color and want to generate 50% transparent 50x50 image using imagemagick from command line. ...

Imagemagick convert pdf to png

I am rather new to using the command line and php. That being said I have been trying to figure out how to use ImageMagick with the exec() function. I have this currently, $command="/usr/local/lib/ImageMagick convert images/a.pdf images/a.png"; if(exec($command)){ echo 'yes'; } else{ echo 'no'; } Which is returning 'no'. ...

Cannot load Rails application with gruff gem

I am trying to load a Ruby on Rails application that uses the Gruff gem. I can load Gruff fine in irb, but whenever I try to load the app (via ruby script/server), it crashes. Here's the full stack trace: /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:303:in `search': undefined method `empty?' for :gruff:Symbol (NoMethodEr...

Finding the install path of a utility with PHP on linux/freebsd/macosx

I have a PHP code block I've written that uses imagemagick's convert program (called through exec()) to create thumbnails of uploaded images (originally we tried using the PHP module calls, but kept running into memory errors). Of course to do this I have to have the full path to convert, which varies from system to system (on my mac it...

Properly converting a CMYK image to RGB with RMagick

I have been using the below to do a color conversion if @image.colorspace == Magick::CMYKColorspace # @image.colorspace #=> CMYKColorspace=12 @image.colorspace = Magick::RGBColorspace @image = @image.negate end It works, approximately, but the color luminosity is off. The fact that I need to negate the image...

Basic easy_install question on python 2.6

I'm trying to install a python api for controlling imagemagick (this) and followed the instructions. I imported easy_install: import easy_install and then input the line: easy_install http://svn2.assembla.com/svn/pythonmagickwand/trunk However I got the error SyntaxError: invalid syntax and 'http' was highlighted. I'm wondering...

Can't get gravity to work with RMagick and 'caption'

I'm using RMagick 2.12.2 with ImageMagick 6.5.6-10 on Snow Leopard. I'm trying to put captions on a collection of photos, and I'm getting the caption to work (i.e. it appears on the image), but I can't get the gravity parameter to work correctly. No matter what I set it to, I end up with some variation on NorthGravity. For instance: Se...

phpThumb cannot find ImageMagick / Imagick

Hi, I'm having a problem with phpThumb. It says in the documentation that to get the best out of it, use ImageMagick / Imagick. I've got this installed on the Server (running Centos 5.1), and can run convert --version and get the right info back. I can also run which convert which returns /usr/bin/convert However, phpThumb can't l...

Success stories of creating Thumbnail images on demand using java

I have a bunch of images on a server. When client requests url for image, the client can specify to either receive the full image or get a thumbnail of the image. So, I'm looking to implement a servlet type solution that processes request, and generates thumbnail on demand if needed. It needs to support jpg, gif, tif, png. It looks like...

ImageMagick PDF to JPEG conversion results in green square where image should be

I'm attempting to convert a PDF to a JPEG using ImageMagick. The PDF: baby_aRCWTU.pdf The command: convert -density 260 -profile 'SWOP.icc' -profile 'sRGB.icm' 'baby_aRCWTU.pdf' 'baby_aRCWTU.jpg' The resulting JPEG: baby_aRCWTU.jpg As you can see, the text is rendered nicely, but the embedded image shows up as a green square. Any ide...

Rounded corners using ImageMagick (bakground transparent or white)

Hi, I'm trying to add rounded corners to my images using ImageMagick. If the input image is a PNG or GIF file my script is working correctly. But if my input file is a JPEG file, the corners are black. I'd like to use a custom corner color in that case (ex. white) any idea ? Here's my working bash script : convert -size "$W"x"$H" xc...

Methods to create text preview from a font

I'm currently using ImageMagick's convert command to create text preview (.png) from .ttf font file. Overall, it's better in auto text positioning despite it failed to read some valid .ttf file sometimes. The speed is not great but acceptable. PIL's ImageFont looks like is not good at text aligning, often prints bottom-left corner of fi...

Can't get ImageMagick to process uploaded images using paperclip

When I upload images I am getting the following error: [paperclip] An error was received while processing: #<Paperclip::NotIdentifiedByImageMagickError: /tmp/stream20091218-7204-1fuv2j1-0 is not recognized by the 'identify' command.> I have staging servers that have been setup on VMs that work fine, but once I move out to the producti...

ImageMagickObject with .Net

Hi folks, Still trying to resolve some image manipulation issues in .Net and I've come across ImageMagickObject.dll mentioned with some .Net projects - is this something usable with an application rather than a website? I have an .net application I'm trying to bridge with ImageMagick or one of its wrappers but not having much luck as my...