Image libraries for Ruby?

I’m trying to write out a script to help me sort out a bunch (more than
1,000) wallpapers, and do so by wallpaper size. I’ve done a little
looking, but so far the only lib I have seen that might help is
ImageMagick, and I want to see if anyone knows of another to do this.

How I’m trying to do this:

gather the x and y size of the wallpaper (this is the hard part from
what I can see).

move that wallpaper into a directory with those dimensions as the name
(such as 1280x1024)

echo the name of that wallpaper, based on a set of rules, into a file to
use as a sort of database to help keep up with everything.

move that wallpaper into a directory with those dimensions as the name
(such as 1280x1024)

echo the name of that wallpaper, based on a set of rules, into a file to
use as a sort of database to help keep up with everything.

http://pastie.caboo.se/98119

If they are all JPEG’s that will work. If not, google around and you’ll
find the routines for figuring it out for other image types. Or look at
PHP’s getimagesize method’s source which handles GIF, JPG, and PNG. All
it does is read some bits from the beginning of the file to get the
right
one.

-philip

“forgottenwizard” [email protected] wrote in message
news:[email protected]

I’m trying to write out a script to help me sort out a bunch (more than
1,000) wallpapers, and do so by wallpaper size. I’ve done a little
looking, but so far the only lib I have seen that might help is
ImageMagick, and I want to see if anyone knows of another to do this.

What's wrong with ImageMagick?  It'll do what you need...

On 7-okt-2007, at 1:20, Just Another Victim of the Ambient M.
wrote:

What's wrong with ImageMagick?  It'll do what you need...

Depends on what system you are running, might be problematic if it’s
Win32 but if you are in the Mac or
if you already have ImageMagick (with convert and stuff, not the
devel libs) you can try my ImageProc. It’s basically
one-sop API for bounds-resizing, in one file.

http://julik.textdriven.com/svn/tools/ruby_libs/image_proc/image_proc.rb

I do like the idea of scanning the headers PHP style, might have a go
at it once for ImageProc :slight_smile:

On 06:18 Mon 08 Oct , Julian T. wrote:

http://julik.textdriven.com/svn/tools/ruby_libs/image_proc/image_proc.rb

I do like the idea of scanning the headers PHP style, might have a go at it
once for ImageProc :slight_smile:

Julian ‘Julik’ Tarkhanov
please send all personal mail to
me at julik.nl

I didn’t want to use ImageMagick because it did a bit more than I wanted
it to, but I went ahead an installed it.

I may look into your lib some, but that may come later when I know that
what I’m trying to do works.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs