rmagick

How do I quickly do something in Rmagick to test it work

I need to be able to quickly convert an image (inside a rails controller) so that the hosting company using managing our application can quickly test at any time to ensure that rmagick is not only successfully installed, but can be called throgh the rails stiack, what is the quickest clean code I can use to do this? ...

Mongrel hangs with 100% CPU / EBADF (Bad file descriptor)

We have a server with 10 running mongrel_cluster instances with apache in front of them, and every now and then one or some of them hang. No activity is seen in the database (we're using activerecord sessions). Mysql with innodb tables. show innodb status shows no locks. show processlist shows nothing. The server is linux debian 4.0 Ru...

error installing RMagick from gem

Hello, Trying to install the RMagick gem is failing with an error about being unable to find ImageMagick libraries, even though I'm sure they are installed. The pertinent output from gem install rmagick is: checking for InitializeMagick() in -lMagick... no checking for InitializeMagick() in -lMagickCore... no checking for InitializeMa...

Installing RMagick on Mac OS X with MacPorts

With the MacPorts version of ImageMagick 6.4.4 installed, I'm getting an error installing the RMagick gem. /opt/local/bin/ruby extconf.rb update rmagick checking for Ruby version >= 1.8.2... yes checking for /usr/bin/gcc-4.0... yes checking for Magick-config... no Can't install RMagick 2.7.0. Can't find Magick-config in /System/Libr...

PIL vs RMagick/ruby-gd

Hi, For my next project I plan to create images with text and graphics. I'm comfortable with ruby, but interested in learning python. I figured this may be a good time because PIL looks like a great library to use. However, I don't know how it compares to what ruby has to offer (e.g. RMagick and ruby-gd). From what I can gather PIL ...

Merb having issues requiring gems

I have merb setup but when I try to run it I get issue with any gems I try to include, e.g. I have the following: require 'RMagick' The rmagick gem is installed, and doing the above in irb (after requiring rubygems works as expected) even putting require 'rubygems' before I require RMagick doesn't fix the issue. ...

How do I make beautiful screenshots of web pages using ruby and a unix server?

I'm trying to programatically create beautiful thumbnail images of a large number of web pages that are hosted on my own ruby/rails-based website. I want to be able to code a stand-alone bit of ruby that looks something like this: require 'awesome-screenshot-maker' items.each do |id| url = "http://foo.com/bar/#{id}" shooter = Awes...

How to deal with memory leaks in RMagick in Ruby ?

Hey there! Im developing web-application with Merb and im looking for some safe and stable image processing library. I used to work with Imagick in php, then moved to ruby and start using RMagick. But there is a problem. Long running scripts causing memory leaks. There are couple solution exists, but i don't know which one is the most s...

Is there a ready made RMagick image editor out there?

I am about to build a basic online image editor for my web application using rails and rmagick. I did a bit of googling but couldn't find any existing solution, however I'd like to be sure before I spend a lot of time rolling my own. Is anyone aware of a plugin/gem that provides a pre-rolled image editor with undo/redo and minimal image...

ImageMagickError unable to read font `(null)': `(null)'

I've been getting this error for a while on my production server (Ubuntu running ImageMagick, Rmagick, etc). From Googling around it seems to be not finding the right fonts to use, and this needs to be set correctly in sudo nano /usr/lib/ImageMagick-6.3.7/config/type-ghostscript.xml When I open up this file it lists a bunch of fonts...

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

Importing SVG into an RMagick RVG session

We have some code that draws things using RVG in RMagick. We scale them at various sizes. What I'm trying to do is use a file that's saved as an SVG as a template. The problem is, is when I load an SVG using Magick::Image.read, and then 'use' it, it rasterizes it, and then scales it, instead of producing pretty vectors. Is there a way ...

Is there a trick to installing RMagick & ImageMagick on Ubuntu?

I keep getting Segmentation faults in the rmagick_processor.rb:52 (part of attachment_fu) while trying to run the test suite for community_engine on a fresh ruby app. I've noticed I have both librmagick-ruby and librmagic-ruby1.8 which are both ImageMagick APIs for Ruby. Should it be just one? If so which? ...

Problem installing RMagick rubygem on Centos 5

I'm having problems installing the RMagick rubygem on Centos 5. I've followed the steps detailed in http://rmagick.rubyforge.org/install2-linux.html but when I try: sudo gem install rmagick the result is: Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native ex...

How to install RMagick gem in Ruby 1.8.6 MingW?

Do you have a detailed guide for this? Thanks a lot :) ...

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

RMagick installation failed in Ubuntu 9.04

I already installed the following: imagemagick libmagickwand-dev but still i get this error. ====================================================================== Mon 05Oct09 19:36:06 This installation of RMagick 2.12.0 is configured for Ruby 1.8.7 (i486-linux) and ImageMagick 6.4.5 Q16 ============================================...

How to read and image and get blob in ruby

I am using a homegrown captcha system. This uses Rmagick and Rmagick comes with ImageList. Existing code is like this. im = ImageList.new("#{@@captcha_image_path}/#{captcha.pos}.JPG") @imgdata = im.to_blob send_data(@imgdata, :filename => 'captcha.jpg', :type => 'image/jpeg', :d...

how to make a spiral galaxy image based on data points?

I'm trying to plot points from a very large array into an image using Ruby. Such that the array items are represented by a point or dot of the appropriate colour, and the dots together form the shape. Since the dots are from the array they are not random in colour or location to each other, so I'm confused how to begin. I want to even...

Combine Thumbnails to One Large Image with RMagick

What's the shortest way to combine say 20 256x256 thumbnails into a single large image of 4 rows by 5 columns using RMagick? ...