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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
*Correction: when I said "image bank" on the message above I was willing to say DataBase (or blob field to be more specific) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 Drehmer" <danieldrehmer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> To: "Ruby on Rails: Talk" <rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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 toperforme> 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 widthand> 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. >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Just wanted to say, I am about to release Fleximage v2, a complete rewrite of the original code. http://github.com/Squeegy/fleximage/tree/master 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: http://github.com/Squeegy/fleximage/wikis/magiccolumns It''s also just better in every way. (Except for storing image in the DB, cause that is no longer supported). On Mar 20, 11:09 pm, Daniel Drehmer <danieldreh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---