imagemagick

How to combine multiple image with Imagick

I have a bunch of files in my database that I want to combine to a single PDF. I am trying to do this with Imagick. I cannot seem to find good documentation and could use some help. I want to read the binary data from my database for each file and then stream the combined file to the users. Here is what I have: //create the Imagick ...

Facebook-like resizing of images using ImageMagick

Hi. I would like to resize (downscale) some images the way that Facebook does it. ImageMagick, but hey, I'm open for suggestions :) I believe Facebook is doing this: Say you have a max width x height of 250x200, Facebook is optimizing the use of this. Tries to use as much of the 250x200 as possible. If for instance you scale down an i...

Imagemagick convert tools generates bigger file size for smaller geometry?

I tried to use convert of imagemagick 6.5.6 to make a smaller version from original JPEG file in both file size and geometry. The command I used is: convert tj/p1.jpg -resize 500x tj/456c2e75fe0faa57fd1cfd87117e0963/p1.jpg The result is funny, the original is 1102x1542+0+0 in 164kb, the converted one is 500x700+0+0 in 174kb. The pixel...

rails PaperClip / S3 / ImageMagick

I'm using paperclip in my rails 3 app to upload photos, resize with ImageMagick and then post to S3. For the life of me, I can't figure out why this process is soooo slow on my localhost? Even without any resizing it's crazy slow... 30+ seconds for one photo? And my network & cpu aren't even working hard? Why? Updating with Model: c...

Bulk sharpen a directory of images with ImageMagick

How can I point imagemagick to a directory of images and use the adaptive sharpen tool to increase the sharpness of all the files in the folder? Thank you. ...

Ruby on Rails Image Upload/Text Overlay

I'm new to using ruby on rails and was looking for help with image upload/manipulation. The extend of my RoR experience is the rails tutorial blog project, but I've used Java and PHP for numerous other projects. I'm trying to create a simple app where the user uploads a file, enters some text, and the text is overlayed on the supplied ...

Image Crop Amazon S3 (works offline)

Hey guys, So im trying to get image cropping to work on Amazon S3, I have the following function def update_attributes(att) scaled_img = Magick::ImageList.new(self.photo.to_file) orig_img = Magick::ImageList.new(self.photo.to_file(:original)) scale = orig_img.columns.to_f / scaled_img.columns args = [ att[:x1], att[:y1], att[:...

Rendering fonts from flash to image

Hello All, I am trying to render an image with text and images that are on a .swf file. What i am doing is saving all the objects and their properties in an XML and then using imagemagick to render all that. the problem i am facing is that imagemagick treats fonts very different than Flash, so i don't get a perfect copy of what i see in...

RMagick not working

I'd appreciate any help with this - I'm sure it's a simple mistake. The location of my app is C:\sanj\rubyjobs. I have installed ImageMagick successfully in its default location: C:\Program Files (x86)\ImageMagick. I have also installed rmagick the gem by running gem install rmagick --local in C:\sanj\rubyjobs\vendor\RMagick Extract...

imagemagick change DPI

Hi, I want to change the DPI of my image using imagemagick, now i found out this can be done by using -density. But as i understand it this will just edit the metadata (filesize remains the same) of the image and the DPI value will be used when printing (it's actually PPI i thought). If you change it it will make the print size larger....

RMagick + Ubuntu - wrong jpeg library?

I'm having an issue getting RMagick to behave on Ubuntu Intrepid. RMagick installed correctly, but when I attempt to use the JPEG manipulation functions, I get the following error: Magick::ImageMagickError (Wrong JPEG library version: library is 62, caller expects 80 However, when I look in /usr/local/lib, I see libjpeg.so.8.0.2 is i...

Tesseract OCR - Newbie Questions!

I just installed Tesseract OCR and was able to convert a TIF image to its corresponding text. The application seems fairly easy to use, but I am struggling finding the documentation that will help me make the most of it. So, here are a couple of questions I hope someone here can help me with: I'm converting PDFs to TIFs using ImageMagi...

Imagick not enough processor power?

I'm trying to do crop animated gif on VDS with this configuration: ~800MHz and 256 RAM And it's not working. It just eats memory and processor and after a ~minute returns no responce. http://i192.photobucket.com/albums/z228/Somebi/no-responce.jpg http://imm.io/1OID On local machine i'v created a virtual machine with 256 RAM. Everyth...

Crop different sized rectangle thumbnails into squares without distorting

Our site takes many different sized thumbnails and converts them to squares for sorting. The squares are 135px x 135px. Our current setup: :styles => { :thumbnail => '135x>' } As you can see, this is downsizing the image to 135px height (while keeping the aspect ratio), the foces the width to 135px causing the image to become t...

Is it possible to get first opaque pixel in column using ImageMagick command line?

If I have png image with object on transparent background, is it possible to get number of transparent pixels before non transparent one in specified column starting from image bottom using ImageMagick command line or I can do this only using API? ...

rails, image upload and resize with imagemagik

I made a small piece of code to upload a file and then resize it with imagemagik. I am using the system("command") function to call imagemagik to resize the image, but the output is a file of size 0 bytes. any idea what could be going wrong? ...

Creation of edge detection based image in PHP

Hi! I'm curious - is it possible to ahieve in PHP: 1) Send image file to server 2) Process image = detect edges and create simple strokes basing on the edges 3) Save file on server / send it to user's browser / whatever Here is some "sample" file ;P (as You can see it wasn't made using any edge detection enabled program, but by hand -...

Turning photo into cartoon using PHP

Hi! Most probably using ImageMagick - how to turn photo into "cartoon"? Here's what I mean: (not sure, that step 2 is necessary). Thanks! ...