imagemagick

How to convert a jpeg image into svg format using imagemagick?

How to convert a jpeg image into svg format using imagemagick? Thank you! ...

ImageMagick and RMagick Installation Problems

I've been trying to install ImageMagick using the Mac OS X installer from Ruby Forge and the RMagick code doesnt want to compile, it outputs: Can't install RMagick 2.10.0. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information. and have_library: checking for Initial...

What is the difference between ImageMagick and libGD?

I don't know anything about either library but I have to choose one of them. Which one whould you recommend? I'm using Perl. I need to generate images for weather site. The image is generated for a location and should contain temperature and a weather condition image inside. I guess this is a piece of cake for both libs. But I want to k...

ImageMagick and Piping

I have the following commands that create a sprite containing a normal state and a hover state: convert -background none -pointsize 11 -fill white -size 100x -gravity NorthWest caption:'Test' top.png convert -background none -pointsize 11 -fill grey -size 100x -gravity SouthWest caption:'Test' bottom.png montage top.png bottom.png -geom...

How do I apply a drop shadow to thumbnails using imagemagick and paperclip?

I would like to alter the processing of thumbnails in paperclip by having imagemagick apply a drop shadow to all the thumbnails. What I'm stuck on is the actual imagemagick command that would pull this little miracle off. Everything I've tried returns an incorrectly scaled drop shadow without the original image. def transformation_com...

How to create a layered PSD file from command line?

I need to create a layered PSD file with ImageMagick or any other command-line tool available on Linux platform. Since I need to do this on Linux server, I can't use Photoshop scripting. The ImageMagick command below creates PSD file with a single layer, where two images (here: plasma fractals) are positioned one below another. (I use I...

Converting Source ASCII Files to JPEGs

I publish technical books, in print, PDF, and Kindle/MOBI, with EPUB on the way. The Kindle does not support monospace fonts, which are kinda useful for source code listings. The only way to do monospace fonts is to convert the text (Java source, HTML, XML, etc.) into JPEG images. More specifically, due to pagination issues, a given inp...

Compiling ImageMagick as 64bit under OS X?

I'm trying to install moddims on OS X (see previous question), an Apache module with a dependency on ImageMagick. As far as I can tell, the OS X Apache is compiled as 64 bit. My previous attempt to run the moddims module I had compiled gave the following error: httpd: Syntax error on line 117 of /private/etc/apache2/httpd.conf: Canno...

Imagick: Remove frames from an animated GIF?

I am trying to understand how to remove frames from an animated GIF. Currently I am trying this (as a test): $count = 1; foreach ($_im AS $frame) { if ($count > 1) { $frame->removeImage(); } $count++; } However this seems to toast everything in the object. Suggestions from workmates have been to just create another I...

Bash Batch Resize Images File Size Problem

I have a small script that I use to resize all of the images in a directory. I run this script in cygwin and it uses "convert" to do the image resizing. The images change their resolution just fine, but I am having problems with file sizes after the script is run. I typically use this script to resize images dumped out from a Powerpoi...

How do I install Image::Magick on Debian etch?

Hi all, I've been trying to install Image::Magick on Debian etch for a while without great success. I've got graphicsmagick-libmagick-dev-compat installed, but can't find the .deb for Perl's Image::Magick. And cpan -i Image::Magick gives me all sorts of compilation errors. Does anyone know the good combination of software so I can fina...

ImageMagick thumbnail not viewable on some browsers

We are using the open source image manipulation tool ImageMagick to take thumbnails of various files. We thought things were running pretty smoothly with all this, until we realized that some browsers (namely Internet Explorer 8 and Chrome) were unable to display the JPEG files. I can only assume that the output of the ImageMagick conv...

ruby Rmagick text width

Im using Rmagick in a ruby project to generate a title, All is working fine as below but i need to put an image after the title and i was wondering if there is any way to find out the width of the text i have just drawn? Thanks canvas = Magick::Image.new(600, 18){ self.background_color = '#212121' } gc = Magick::Draw.new g...

Best way to process images on server?

I know there is a lot of discussion over GD or ImageMagick for a LAMP setup. I can't seem to get a solid answer on the best one though so I will explain my specific needs and maybe someone can help. I will be using on a social networking site where users uploads photos to there image gallery. All I need it to do is upload the file and...

Imagemagick not installing with MAMP

So I read this article on how to install Imagemagick with MAMP, and did exactly how it said, (sudo port install Imagemagick, everything installed okay, then change the envvars file), yet I still get this error when trying to run a script that uses it: Fatal error: Class 'Imagick' not found in /Applications/MAMP/htroots/active/includes/i...

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...

Using trimbox with ImageMagick

I have a PDF-file with the following dimensions; mediabox: 23.08 x 31.78 cm cropbox: 23.08 x 31.78 cm trimbox: 21 x 29.7 cm I'm using ImageMagick to try and get the trimbox value using Imagemagick's trimbox function. identify -format "%[fx:(w/72)*2.54]x%[fx:(h/72)*2.54]" -define pdf:use-trimbox=true foo.pdf This line of code gives...

Setting quality with imagemagick?

I use the following code to create a thumbnail on the site: $small_image = new Imagick($large_path."/".$pic['image']); $small_image->thumbnailImage(100, 0); $small_image->writeImage($small_path."/".$pic['image']); It sets it's own quality and I tried adding $small_image->setCompression(imagick::COMPRESSION_JPEG); $small_image->setCom...

PHP Image Resize & My upload script.

I have seen a lot of examples, but I am not sure how it can tie into the upload script i currently have. Could someone please explain how I might be able to use ImageMagick or something of the like to resize an uploaded image to a fixed width while keeping the w:h ratio? I have googled and looked at over 150 web pages but none of them ...

Combined re-scaling and color reduction of an image in Java?

Given a rectangular input image I'd like to create an output image of size 40x40 pixels using a maximum of 10 colors. Hence, the two operatons needed are re-scaling and color reduction. The following ImageMagick command does the trick: convert input.png -scale 40x40 -colors 10 output.png How would you achieve the corresponding result...