I want to create jpgs on the fly but I dont see any module for this. There
is a ruby/GD module but it has to be build from ruby source which Im
disinclined to do. Are there any other solutions anyone knows of?
Seriously, I know of nothing like this for ruby but haven’t looked
hard either. Java has this but it was a real bear to use last time I
looked.
···
At 01:37 AM +0900 12/25/02, me wrote:
I want to create jpgs on the fly but I dont see any module for this. There
is a ruby/GD module but it has to be build from ruby source which Im
disinclined to do. Are there any other solutions anyone knows of?
I want to create jpgs on the fly but I dont see any module for this. There
is a ruby/GD module but it has to be build from ruby source which Im
disinclined to do. Are there any other solutions anyone knows of?
begin
im.save ‘output.jpg’
rescue
$stderr.puts “Couldn’t save output.jpg: #$!”
end
pabs@vault:~/proj/jpg> ./jpg.rb
pabs@vault:~/proj/jpg> file ./output.jpg
./output.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, 1 x 1
pabs@vault:~/proj/jpg>
Caveats: Only works under Unix variants (Linux, FreeBSD, etc), and
Imlib2 itself is not really being actively developed any more (although
there are bugfixes etc). Anyway, Imlib2-Ruby is available at http://www.pablotron.org/software/imlib2-ruby/ if you want to check it
out (and there are packages available for Debian, as well as a FreeBSD
port). I’m looking at wrapping another popular image processing
library, but I haven’t started on that yet.
···
Brad Cox (bcox@virtualschool.edu) wrote:
At 01:37 AM +0900 12/25/02, me wrote:
Seriously, I know of nothing like this for ruby but haven’t looked
hard either. Java has this but it was a real bear to use last time I
looked.