Bitmap manipulation


#1

I would normally use FreeImage, but I cannot find a Ruby wrapper for
this?

So if I can’t find a wrapper for FreeImage is there any other suitable
libraries that I can use with Ruby?

Thanks,
Jim.


#2

On 2/16/07, Jim B. removed_email_address@domain.invalid wrote:

I would normally use FreeImage, but I cannot find a Ruby wrapper for
this?

So if I can’t find a wrapper for FreeImage is there any other suitable
libraries that I can use with Ruby?

Thanks,
Jim.

http://seattlerb.rubyforge.org/ImageScience.html

appears to wrap FreeImage.


#3

Jim B. wrote:

I would normally use FreeImage, but I cannot find a Ruby wrapper for
this?

So if I can’t find a wrapper for FreeImage is there any other suitable
libraries that I can use with Ruby?

Thanks,
Jim.

http://seattlerb.rubyforge.org/ImageScience.html


#4

No ImageScience uses Free Image but does not expose much of it, it
appears to be a simple lib for creating thumbnails.

Thanks,
Jim.


#5

On 2/16/07, Jim B. removed_email_address@domain.invalid wrote:

No ImageScience uses Free Image but does not expose much of it, it
appears to be a simple lib for creating thumbnails.

Thanks,
Jim.

If you have ImageMagick or GraphicsMagick available, RMagick…
http://rmagick.rubyforge.org/


#6

have u tried RMagick ?

i found it very useful, a lots of functionality easy to implement.

Thumbnail can be made really easily with RMagick.

I am using RMagick in my rails based captcha plugin SimpleCaptcha(
http://expressica.com/2007/02/06/simple-captcha-released-the-captcha-for-rails-applications/)
and its working absolutely fine.


#7

Rmagic looks like it will work a treat.

Many thanks again,
Jim.


#8

example to generate THUMBNAIL using RMagick

======================================
require ‘RMagick’
include Magick

img = Image.read(“image/path/my_image.jpg”).first
thumb_img = img.thumbnail(50, 50)

thumb_img.write(“image/path/my_image_thuumb.jpg”)

=======================================
check out more details here
http://www.simplesystems.org/RMagick/doc/image3.html#thumbnail