Hi everyone,
I have a photo site that I''m making and I''m using file_column
to
handle the auto-generation of several "version" of each photo:
essentially thumbs and fuller-sized version. The full sized versions
retain the original''s proportions, whereas the thumbs are all 4:3.
This means most of the thumbs are cropping the original. This all
works great, but I want to let the user rotate the image after it has
been uploaded and "processed".
This means I can simply rotate all the normal versions directly, but
the thumbs will have to be regenerated. How can I trigger
file_columm''s auto-generation function without "reuploading"
the
image? Or better yet: is there a clean way to represent the image
"versions" (which would consist of dimensions and cropping) which I
can plug into the file_column and RMagick?
file_column :image, :store_dir => :photo_store_dir, :magick => {
:versions => {
:small_thumb => { :crop => ''1:1'', :size =>
''40x40>'' },
:large_thumb => { :crop => ''4:3'', :size =>
''100x75>'' },
:small => { :size => ''640x480>'' },
:medium => { :size => ''800x600>'' },
:large => { :size => ''1024x768>'' }
}
}
The above code works great. I just want to be able to use
:small_thumb => { :crop => ''1:1'', :size =>
''40x40>'' } in my RMagick
code in order to regenerate my thumbs. Any ideas?
Thanks,
Ryan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---