imagemagick

Magick++ animation generation via SDL pixel data

I'm trying to generate ImageMagick images from SDL pixel data. Here's what the GIF looks like so far. (This GIF is slower than the one below on purpose.) Here's what it's supposed to look like. Notice in the above image that the pixels seem to be overlayed on top of other pixels. Here's where the GIF is actually created. void Drv...

ImageFont's getsize() does not get correct text size?

I use the following two methods to to generate text preview image for a .ttf font file PIL method: def make_preview(text, fontfile, imagefile, fontsize=30): try: font = ImageFont.truetype(fontfile, fontsize) text_width, text_height = font.getsize(text) img = Image.new('RGBA', (text_width, text_height)) ...

Background Gradient with Magick++

Hi, How do I create gradients with ImageMagick in C++? I am trying to create a visual representation of a WAV file. I can create an Image with Magick++, draw in the waveform data and save the image as a .png file but it still looks a bit basic. I'd like to give the image background and waveform gradients but I don't know how. Are the...

Output filenames when extracting a range of pages from pdf into jpeg using Imagemagick

Hi, I am trying to extract a range of pages from a multipage pdf file into individual jpegs using convert (Imagemagick). The extraction works fine. What I am stuck on is that if I want to extract page range 10-20, I still get out jpeg files with names page-0.jpeg to page-9.jpeg while I want them to be named page-10.jpeg to page-20.jpeg....

How to speed up image resizing in a CodeIgniter PHP application?

I have an application that allows users to upload images. The test case I use is a jpeg of 1.6MB with dimensions 3872 x 2592px. The upload script in the back-end will resize the uploaded image into 6 additional formats: square (small 75 x 75) Small Thumb (50 x 38) Thumb (100 x 76) Small (240 x 161) Medium (500 x 378) Large (1024 x 774)...

java ProcessBuilder doesn't work right with Imagemagick on windows

I'm using im4java to call imagemagick from a grails app. The command line I'm trying to get it to use is convert "c:\ZonesG\web-app\spresources\summarypage_images\00\09\18\myimage.jpg" -resize 100x100 "c:\ZonesG\web-app\spresources\summarypage_images\00\09\18\myimage_thumbnail100.jpg" or convert c:\ZonesG\web-app\spresources\summarypag...

How to create a reflection Effect using ImageMagick?

What would be the command to create a reflection effect using ImageMagick which fades out as a gradient. Like shown in http://reflection.corephp.co.uk/gfx/shot.jpg ...

How can I upload an image from a URL in PHP

In PHP using GD or imagemagick how can I uplaod a photo from a URL, I want to build a function that I can pass in a few parameters and uplaod the image, I can currentyl uplaod a big image, resize it smaller, then resize some more thumbnails off it and save all into there locations from 1 image but I would like to add the ability to get a...

How to generate a thumb image?

I have a folder of about 20000 images, and I need to generate thumb images for them. What's the fastest way to do this job? I know I can do it using some image resizing libraries. But I am wondering maybe there's already a tool or code snippets that could do this job. ...

Image processing class in PHP

I need to build a PHP photo processing class, I know there are MANY that already exist to the public but I need to build one to do just what I need done and nothing extra and nothing less. I need my class to do this... 1) I create a new instance of my class and I pass in either a URL of a photo, or the path to a local photo being up...

Why isn't my image in the center when I use Perl::Magick's Extent with Gravity?

I am trying to use ImageMagick to extent an image a little bit: my $image = Image::Magick->new; open( IMAGE, $filename ); $image->Read( file => \*IMAGE ); close(IMAGE); $image->Extent( gravity => 'Center', width => 150, height => 150, ); $image->Write( $outfile ); while the the image is extented to the correct size, it is not in the...

ImageMagick: Tiff to PDF from PHP

How can I convert 2 tiff images to PDF, I already knows how to get the image out of the DB, and I print it using echo and setting up the MIME type. But, right know I need to use a duplex printer option, so I need a way to generate a PDF from inside my PHP page, that PDF must containt both TIFF images (one per page) How can I do that? Wh...

rmagick or other library for producing 3D pie chart

I am interested in making a 3D pie chart dynamically on my page depending on values pulled from my database. The chart would only be updated every few days, so I don't mind a process intensive task as I could cache the image. 2D charts and pie graph libraries seem to be everywhere, but are there any libraries (server side image magic, or...

ImageMagick: Different PDF render results when exec() in PHP?

I'm using ImageMagick to render PDFs as master JPGs as an intermediate step before making thumbnail images of various sizes, and I'm getting different results when I execute the command in PHP using exec() than I get when I run it on the command line directly. This is the command I'm using: exec("/opt/local/bin/convert -geometry 1000x1...

Automate conversion of text to PNG (or another file format with transparency)?

I need to take a list of words and create a PNG file of each, with a transparent background. I’d like my script to allow for adjustable opacity of the foreground, but I can probably also do it after the fact when the images get imported into Matlab. I imagine this is doable with ImageMagick and have installed that on my Mac. If someon...

Limit number of threads in IMagick (PHP)

When using ImageMagick, I can set certain limits for memory usage and maximum number of threads. There are 3 ways to do this, as far as I know: use a command line options like "convert -limit memory 128mb original.jpg new.jpg" use environment variables like "MAGICK_THREAD_LIMIT=1" edit the 'policy.xml' configuration file to change the ...

Trying to install Rmagick on Debian

One of things you need to do to get Rmagick installed apt-get install libmagick9-dev When I try that I get the following errors Reading package lists... Done Building dependency tree... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distributio...

How do I remove EXIF tags while preserving the ICC color profile?

I am programmatically generating several sizes of thumbnails for images. I need to preserve the color space of an image while removing all (other) EXIF information. I am using imagick on PHP 5.3, but information on how to do this with any imagemagick API would be helpful. I'm trying to prune the file size of my image thumbnails as muc...

ImageMagick - Resize image to square.

Hey S.O. People I have just started doing some ImageMagick work. I am currently trying to convert an image from a file size that is almost square (1411 x 1486) or similar sizes to a square shape, like 1024x1024 unfortunately the resize function doesn't seem to do a resize of the canvas so i keep getting number like 1024x982. I am wonder...

Processing Adobe Illustrator files

I have a set of AI files that I want to scale up. The AI files have a size of 200x200, and I want to scale them up to 400x400. As Illustrator does things with vectors it's not a problem, but now I want to do this for many AI files, and wanted to do it programmatically. Imagemagick's convert is able to take an "ai" file as input, but d...