imagemagick

phpThumb PDF thumbnail

Hi, I am using phpThumb to create thumbnails of PDFs uploaded to my site. This is working for some PDFs but others produce an error that states imagemagick and or ghostscript are unavailable. These should be available as phpThumb is using these for the working PDF thumbnails. One thing that I have noticed is that it tends to be PDFs ...

png24 to png8 conversion

Hello, I want to convert the input 24 bit PNG image to 8 bit, I have tried using Imagemagick and Python PIL, neither works. for instance: at Imagemagick I try convert console command as such: convert -depth 8 png24image.png png8image.png And here is the way I tried with python: import Image def convert_8bit(src, dest): """ ...

ImageMagik/UNIX: How to recursively process a nested directory of photos?

Question: How do I recursively process, using Imagemagik (convert), a nested directory of photos? I have the following directory structure: / ..2008/ ....a.jpg ....b.jpg ..2009/ .....c.jpg And I want to run the following ImageMagik command on each file, to clean/resize up the images, and then save the resulting image out as the exact...

image magick problem with java

to be specific in this i'm trying to run the next line on java: convert /home/mohamed.hegab/Desktop/1263392123111.jpg -gamma .45455 -resize 400x400 -gamma 2.2 -quality 92 /home/mohamed.hegab/Desktop/small.jpg which is run great on the bash command line but when i run it on the java using process builder it gives me strange result. ...

How can i calculate where the non transparent part of an image starts and ends with PHP?

Hi people, Here's a question: let's say we have a png image 200x200 that is transparent and there is a shape that starts at x,y (50,50) and has a width of 50px and height 20px. Is there any way with PHP (gdlib or imagemagick) that i could get the position of the shape relative to the image size? For the example given the script should ...

PDF convert with ImageMagick and Ghostscript on Windows Vista/7 x64

Hello all, I've just spent the last three hours getting ImageMagick to play nicely with PHP for a PDF to JPG convert. Instead of documenting it myself locally, I figured I'd write it up here, with all the buzzwords and things I screwed up, so the next noob can save some time. Tested on two OSs,Windows 7 x64 and Vista x64, with PHP 5....

How to get c buffer from ImageMagick Image

I'm using the iPhone port of ImageMagick. I'm trying to loop through the frames of an animated gif and turn each frame into an UIImage. I know I can init a UIImage with NSData which I can init with a const void *. So how to I get the buffer and length of the image? Here's the code: MagickReadImage(wand, filename); while...

How to edit an PNG image per pixel via cli?

Say I have an PNG image where I want to change certain pixels to, say, black. How would I do that? My guess is that I should take the ImageMagick route. But how would I change, say, pixel ten from the top and from the left to black? To, say, 2% grey etc? EDIT: Since the comment field doesn´t work for code, this addition is directed t...

linux command line graphics display

What I'm trying to accomplish: On Ubuntu 10.04 I'd like to display a small notification image in the corner of the screen and have the image fade out. I'd like to do it from the command line for use with bash scripts. Similar to "notify-send", "zenity", or "dialog" except it displays images as well. What I've found so far: ImageMagi...

Group photos by color

I have a pretty big number of photos and a RGB color map (let's say of about 100 colors). How can I group the pictures by color and obtain something like the following: http://labs.ideeinc.com/multicolr ? My current idea is this: Using ImageMagick, do this for each photo: Resize it to a smaller size so that it can be processed faster....

How do I open an image and re-save it using ImageMagick?

I'm doing it to image uploads to prevent any embedded malicious code. Am I right in doing this? But yeah my main question is how to actually do it, because I've never used ImageMagick before - I've just installed it on my server. ...

how to make "gem install rmagick" work?

I wanted to install rmagick on Win7 but it can't install: Is there any way to make it work? C:\>gem list -r rmagick *** REMOTE GEMS *** rmagick (2.13.1) rmagick4j (0.3.7, 0.3.4 java) C:\>gem install rmagick Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem na...

Rounding text on the X and Z cartesian coordinates

Hello, For an online shop that allows engraving, I want to generate a preview for the customers of their engraving. Some of the products are round so I have to round the engraving text as well, however I am clueless on how to achieve this. This is a good example of what kind text effect I'm after, note that at this moment I'm not inte...

ImageMagick Mogrify: batch with watermark problem

Hi, I have a strange probleam with running ImageMagick mogrify on several files. I use conversion string to make several transformation on images, which results in thumbnails. The command with the conversion string runs fine on single file, however when ran on a batch of files, it sometimes fails. Here is the command (windows command li...

Ruby graphic libraries

What's the difference between RMagic, ImageMagick, GD, etc. and which one should I use? I was looking for a thumbnail generation script and noticed that every script I found uses a different library for the same thing. ...

Wrong colours when converting TIFF image to PNG in ImageMagick

Hi there, I'm working on a PHP script that automatically converts TIFF images to PNG files. For that purpose, I use ImageMagick: $ convert a.tif a.png It works to some degree, however, the colours are very acute and deviant from the way they are pictured on my PC. To illustrate the problem, please have a look at the enclosed files, ...

How to convert images (GIF, JPG, JPEG, PNG) to TIFF in PHP?

How can I convert images to .tiff with php? (im testing on win xp) I remember I used imagemagick to do this but I cant find the code now, and couldnt find any example on google. A code sample will be appreciated. Also, is there a way to do it without imagemagick? ...

Imagemagick perspective and virtual pixels

I'm trying to automatically straighten an image so that a grid is aligned with the picture. However, whenever I do the manipulation there is a white border around the image. Can anybody help me with this problem? ...

Clone PDF file in a single page

I've got a PDF file which is exactly 1/5 of the size of an A4 page, and a script to convert it into a single A4 page by appending it repeatedly. The problem is that ImageMagick only works with bitmap graphics, and my PDF contains text and detailed vector graphics. The result is therefore loss of text data, much bigger file size, and wors...

Ghostscript converting Postscript to PNG is over-saturated

I'm trying to use Ghostscript and/or ImageMagick to convert each page of a Postscript document into PNG images. The problem is that both produce images that are way too saturated (I think that's the right terminology). Here are the commands I'm trying: gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -dGraphicsAlphaBits=4 -sOutputFile=page...