imagemagick

JMagick Error when trying to load a file - UnsatisfiedLink

java.lang.UnsatisfiedLinkError: no JMagick in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1754) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1045) when trying to use the code ImageInfo info; try { info = new ImageInfo(); //image ...

How to create watermark with imagemagick

I'm trying to create a watermark with ImageMagick however, the guides on layering are pretty daunting. Basically I'll have one base image say "base.jgp" and an overlay image say "overlay.jpg". Overlay.jpg would be smaller than base.jpg. Which exec command would I run to place overlay centered on top of base.jpg? Thanks! ...

Calling script on image upload in Drupal

Hi all, I would like to call a Ruby script when a user uploads an image to my Drupal content-type. I have a CCK image field that serves as the main image, and ImageCache takes care of resizing and creating thumbnails for me. I have a Ruby script that does some transformations to the image, however I don't exactly know how to call it (...

RMagick convert ps to pdf

When I convert a ps file to pdf, it works fine on the local machine, but on the production server, it adds margin to the page, as if I selected Scale to Fit instead of Scale: 100% from the Mac OSX Preview print settings. How do i prevent this? Currently, I'm doing: Magick::ImageList::new('cool.ps').write('cool.pdf') # only works on loca...

Imagemagick JPEG-2000 problem and PHP

Hi, i'm experiencing some problems with the JPEG-2000 file format and Imagemagick. First of all i needed to identify a jpf file, i couldn't get this to work after lots of tries, any idea if this is supported? I always got following error: identify -format "%m" Schutters_1.jpf error: cannot decode code stream identify: unable to dec...

how to wrap text in imagemagick

I was able to figure a basic word wrap function like this $draw = new ImagickDraw(); $x = 0; $y=20; $angle = 0; $str = "some text for testing of a word wrap in imagemagick"; $str = wordwrap($str, 10,"\r"); $im->annotateImage( $draw, $x, $y, $angle, $str ); and that seems to work ok except that the tracking i think its called you ...

How do I detect an animated GIF's ticks per second?

I'm looking for a way to detect the (average) frame rate of an animated GIF using Linux. PHP's Imagick class seems to provide this functionality but I rather avoid installing a ton of libraries to get it to work. http://www.php.net/manual/en/function.imagick-getimagetickspersecond.php Is there a simple way to do this? ...

imagick binary to count number of pages in a pdf file

Hi Could someone suggest the php code using exec() function to execute a binary of imagick to count the pages in a pdf file. Any suggestions would be great. Thanks! Regards Rahul ...

What are best parameters to run ImageMagick to convert low quality pdf to images (for OCR)

Hi, I have several low quality pdfs. I would like to use OCR -- to be more precise Ocropus to get text from them. To do use, I use first ImageMagick -- a command line tool to convert pdf to images -- to transforms these pdfs into jpg or png. However ImageMagick produces very low quality images and Ocropus hardly recognizes anything....

Remove EXIF data from JPG using PHP

Is there any way to remove the EXIF data from a JPG using PHP? I have heard of PEL, but I'm hoping there's a simpler way. I am uploading images that will be displayed online and would like the EXIF data removed. Thanks! EDIT: I don't/can't install ImageMagick. ...

How to insert one row spacing between tiles in a tiled image using Imagemagick?

I have a bunch of images that I want to tile together in one row. This can be done using Imagemagick montage like this montage `ls tile*.png` -tile x1 -gravity west -geometry 1x1\<+0+0 out_file.png However, now I want to insert one pixel of spacing after each tile. I played with -tile-offset -1+0 for a bit but this would not change an...

Imagick doesn't render svg opacity properly.

First image was properly exported by Inscape, second by following code. I need same output from inkscape and imagick. PHP code: <?php $im = new Imagick(); $im->setResolution(400,400); $im->setBackgroundColor(new ImagickPixel('transparent')); $im->readImageBlob(str_replace(array("color1", "color2"), array("yellow", "blue"), file_ge...

Error installing ImageMagick-6.6.3-10

I'm trying to install ImageMagick-6.6.3-10. I've downloaded and extracted the tar file and ran make install as root. When running make check it says "1 or 48 tests failed". The failed test is: FAIL: Magick++/tests/attributes.sh Any ideas what to do from here to get to resolve the failed test so everything's working properly? (I'm runn...

problem in imagemagick and grails

i have a new problem in image magick that look strange .. i'm using mac osx snow leopard and i've installed image magick on it and it's working fine on command .. but when i call it from the grails class like the following snippet it gives me "Cannot run program "convert": error=2, No such file or directory" the code is :- public s...

PHP Script for Imagemagick

Hi, can anybody recommend a script which creates Thumbnails with imagemagick? All I could found were too old. It has to run with php5 and on a newer linux server. It is important, that it uses imagemagick and not GD Lib. I already know timthumb, but it uses GD lib. ...

Detect image border dimensions with ImageMagick

I have an image of a form, with black text and object over a white background. The form has a thin solid border. I would like to do two things: Measure the dimensions of the border to determine the dimension and proportion of the form itself. Detect if the border is not perfectly aligned (has some angle of offset) and possibly rotate...

Perl & Image::Magick, getting color values by pixel

I'm using Perl and the Image::Magick module to process some JPEGs. I'm using the GetPixels sub to get the RGB components of each pixel. e.g. my @pixels = $img->GetPixels( width => 1, height => 1, x => 0, y => 0, map => 'RGB', #normalize => 1 ) print Dumper \@pixels; $img->Resize( ...

How to tile in left-right-bottom-top order in imagemagick montage.

I have a several sets of numbered png images (mostly 00-23 but some are different lengths) that I am trying to combine in imagemagick montage, but I need to have them tiled in left-right-bottom-top instead of left-right-top-bottom order. How can I do this? ...

PHP Converting PDF's to images -dUseCropBox

I'm trying to convert a PDF to an image and I need to make sure that the -dUseCropBox parameter is specified for when calling Ghostscript. Can this be done? convert "/var/www/vhosts/site.co.uk/httpdocs/uploads/source_pdf/PP4SDpdf.pdf" -resize 500X500 "/var/www/vhosts/site.co.uk/httpdocs/uploads/image_pdf/SaturdayTest.jpg" It works wel...

Installing rmagick on Ubuntu

Hey all - I'm trying to get RMagick setup on Ubuntu 10.04. Looked here but had no joy. I even compiled and installed ImageMagick from source, but the instructions here still didn't help me when I try to install RMagick using RubyGems. I got this error: carcher@carcher-laptop:~/Code/temp/RMagick-2.13.1$ sudo gem install rmagick Buildin...