FlexImage - retrieving width / height

Hello everyone.

I’m trying to find out if it’s possible to tell fleximage to performe
some tasks before storing the image on the filesystem (or database).

I alredy know it’s possible to scale down the image before storing
it… But i’m wondering if it’s possible to either store the width and
height of an image in the image bank so I can use this data in post
processing, or if I can’t retrieve it to use in my logic before the
storage.

If I can’t do it with fleximage, can anyone tell me how could I get
the width or height of an image using RMagick?

Thank you very much.

*Correction: when I said “image bank” on the message above I was
willing to say DataBase (or blob field to be more specific)

In ImageMagick one can use identify with the -format option to get
width and height info. RMagick is based on ImageMagick so there must
be a corresponding API.

hth,

– Long
http://FATdrive.tv/wall/trakb/10-Long
http://FATdrive.tv/ - store, play, share

----- Original Message -----
From: “Daniel D.” [email protected]
To: “Ruby on Rails: Talk” [email protected]
Sent: Friday, March 21, 2008 1:09 AM
Subject: [Rails] FlexImage - retrieving width / height

Hello everyone.

I’m trying to find out if it’s possible to tell fleximage to
performe
some tasks before storing the image on the filesystem (or database).

I alredy know it’s possible to scale down the image before storing
it… But i’m wondering if it’s possible to either store the width
and

Thank you for the reply.

I think you may be right about rmagick/image magic…

I’m still a little confused about how could I accomplish this…

Does anyone has a second shot on this?

In the meanwhile, I guess I’ll study more.

Just wanted to say, I am about to release Fleximage v2, a complete
rewrite of the original code.

It makes preprecessing, as well storing the filename, width and
height, exceedingly simple. Just add image_filename, image_width, and
image_height fields to your model’s database table, and they will be
filled in automatically when files are uploaded.

More magic columns here:

It’s also just better in every way. (Except for storing image in the
DB, cause that is no longer supported).