rmagick

using Rmagick to resize height first

Hi all, I am trying to resize an image with Rmagick and if I use the resize_to_fit method to always resize the height first, preferring that to width, but it seems as if most of my images are being resized to width first. IS there anyway using the resize_to_fit method to tell it "prefer height over width"? ...

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

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

simple text to image solution for rails

Before I start rolling my own using Rmagick I though i'd ask as this is probably a quite common use case. I have a few hundred email addresses which I would like to display to the user for each entry however I would like to avoid displaying the emails as plain text to avoid scraping, so I'm looking for some text-to-image solution. It ...

attachment_fu rmagick on phusion passenger

Hi, I am getting so much pain with setting up rmagick on Passenger . I’m developing a rails web application that has image processing feature using imagemagick. the image processing feature is working 100% on development using mongrel, but once i deploy it to production which uses phusion passenger I get the error uninitialized constan...

attachment_fu thumbnails rmagick

I have searched the forums up and down and haven't found the solution to the problem I'm facing. I have rmagick and attachment_fu going at it on my application. I can upload files just fine, but I can't generate any thumbnail images. When I look at the db, the width and height it shows null for the original file and thumbnail. When I ...

Magick::ImageMagickError (Postscript delegate failed `/tmp/magick-XXA7JtQ8': @ error/ps.c/ReadPSImage/779: `(null)'):

I installed imagemagick success, development]# convert -version Version: ImageMagick 6.6.3-4 2010-08-11 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC Features: OpenMP and rmagick 2.13.1 success too. and I test with such script. require 'rubygems' require 'RMagick' Magick::Image.new(110, 30)...

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

RMagick with a direct form submitted Image from Sinatra

I am trying to do something quite simple using Sinatra and RMagick. Take a image, through a simple form file upload Use RMagick to resize it Then store it in a database for persistence (irrelevant) But after going through the RDocs and endless head banging testing I can't seem to get the form image to a RMagick object cleanly. This...

RMagick warning while running server

I am using gem 1.3.7, rails 2.3.5 and ruby 1.8.7 (2008-08-11 patchlevel 72). While starting server i get below warnings. Loading development environment (Rails 2.3.5) /Users/me/.rvm/gems/ruby-1.8.7-p72@mbm/gems/rmagick-2.13.1/lib/RMagick.rb:44: warning: already initialized constant PercentGeometry /Users/me/.rvm/gems/ruby-1.8.7-p72@mbm...

RMagick convert problem

Hi In linux i'm doing the below to convert a multipage PDF into images resized and with a high resolution: convert -verbose -colorspace RGB -resize 800 -interlace none -density 300 -quality 80 test.pdf test.jpg For the life of me, i can't seem to reproduce this EXACT command using RMagick. I tried something like this below but the im...

no such file to load -- rmagick

I have following - Gem Version - 1.3.2 Ruby Version - ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux] Rails Version - Rails 2.3.5 ======================== rmagick (2.13.1, 2.10.0) Authors: Tim Hunter, Omer Bar-or, Benjamin Thomas Rubyforge: http://rubyforge.org/projects/rmagick Homepage: http://rubyforge.org/projects/rmagick In...

Rmagick write text in Images

Hi, Can someone please spend me some line of codes, that add a text at the bottom of an image? I want to use Rmagick but I'm open for other tools also. thank you! ...

resize image in ruby on rails using rmagick without losing quality

I need to resize an image in rmagick from its current size to a fixed width to a width of 300 without losing image quality. Currently I am doing following for a jpg image if previewImage.columns > 300 previewImage.change_geometry!("300x") { |cols, rows, img| img.resize!(cols, rows) } end am not sure if t...

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

Ruby 1.9 compatible plotting / graphic library?

I feel like I have a simple desire that no one can satisfy: I want to be able to graph a set of points, and I am using Ruby 1.9.2. I would like to use Gruff or Scruffy, since these seem to be the easiest to use. However, they both rely on rmagick, and it seems that many other libraries do to. Rmagick isn't compatible with Ruby 1.9 thoug...

Rmagic isn't work on Rails3

Hi guys , My Rmagic isn't work ruby -v ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32] rails -v Rails 3.0.0.beta4 irb require rubygems true require rmagick true but , I put the fllow code: gem 'rmagick', :require => false it error: checking for Ruby version >= 1.8.5... yes checking for stdint.h...

Can't find Magick-config

I am getting the following error when I try to run my dev console (MAC OS X / Snow Leopard). Does anyone know the solution? /usr/local/bin/ruby extconf.rb checking for Ruby version >= 1.8.5... yes checking for gcc... yes checking for Magick-config... no Can't install RMagick 2.13.1. Can't find Magick-config in .:/usr/local/bin:/usr/loc...

rake db:migrate fails : looking for RMagick - why?

I just created a simple migration to an existing project. This project uses RMagick, and when I call rake db:migrate the migration fails thus: Dans-iMac-335:myserver apple$ rake db:migrate (in /Users/apple/Documents/projects/electionjoy/glowing-mist-78) dlopen(/Users/apple/.gem/ruby/1.8/gems/rmagick-2.12.1/lib/RMagick2.bundle, 9): Libra...

Image Manipulation in Ruby

I'm looking for a way to load up an existing png image, and do a pixel by pixel manipulation of the values. Ideally, something like image = Image.open('my.png') image = image.map_each_rgb do |r, g, b| [r-12, g+2, b+30] end image.save('my.png') I've looked into rmagick, but couldn't find a way to achieve this. Are there any alternat...