Is there any possibility of resizing image-files in Ruby?
Is there any possibility of resizing image-files in Ruby?
Well, you can look at RubyMagick for example
http://www.acc.ne.jp/~tam/RubyMagick/
Guy Decoux
Is there any possibility of resizing image-files in Ruby?
Well, you can look at RubyMagick for example
RubyMagick only did coredumps to me. I have installed the ImageMagick
package, and called ‘convert’ cmdline util from my ruby program instead.
A bit slower, I guess.
Circum
RubyMagick only did coredumps to me.
Which version of ImageMagick ?
pigeon% ls -al model.gif b.gif
ls: b.gif: No such file or directory
-rw-r--r-- 1 ts ts 23433 Mar 29 20:17 model.gif
pigeon%
pigeon% cat b.rb
#!/usr/bin/ruby
require "magick"
model = Magick::Image.new("model.gif")
example = model.dup
example.set "label"=>"resize"
example.resize('200%', Magick::FilterType::Lanczos, 1.0)
example.write("filename" => "b.gif")
pigeon%
pigeon% b.rb
pigeon%
pigeon% ls -al model.gif b.gif
-rw-r--r-- 1 ts ts 112270 Jul 29 11:49 b.gif
-rw-r--r-- 1 ts ts 23433 Mar 29 20:17 model.gif
pigeon%
Guy Decoux