Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Looking for image processing library for pure Ruby [closed]

Most of the libraries/ codes I find are for RoR and not pure ruby. Even if I google pure ruby image upload, I get Pure Ruby On Rails ;)

So...I am looking for a gem/ library/ code that will do simply couple things:

  • check if it's a valid image file
  • resize image to the predefined values
  • save it as jpg (from jpeg, jpg, png, gif, bmp)
like image 900
meso_2600 Avatar asked Dec 18 '12 10:12

meso_2600


2 Answers

Check out mini magick or rmagick:

There are others.

Note you can use a gem outside of Ruby on Rails. In your command line do:

$ gem install gem_name

And in your ruby file, require it

require 'gem_name'

like image 151
AJcodez Avatar answered Nov 04 '22 00:11

AJcodez


checkout https://github.com/jcupitt/ruby-vips a fast an awesome image processing library

like image 22
Orlando Avatar answered Nov 04 '22 00:11

Orlando