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?
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.
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).
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.