I have limited space in my web design to display the logo of the upcoming
event. So I put in code like this.
file_column :image, :magick => { :versions => { "250x165"
=> "250x165"}}
I was under the assumption that the image under directory 250x165 will be of
this size if the image is bigger than 150x165. But I found out that for an
image of size 134x88 the image under the directory is of 250x164.
So in this case the image had to be enlarged which doesn''t look good.
Since
in this case the original image itself was smaller than 150x165 , I had
rather use the original image.
I am using file_column plugin. Is there a way I can tell file_column to keep
the original file under 250x165 if the the original image is smaller than
250x165. Otherwise I will have to start storing the file size of the
original image and then compare and then sometimes use original image and
sometime use the resized image.
Any suggestions on how to handle this case.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Alex Wayne
2006-Nov-21 05:09 UTC
Re: file_column and resizing only when it''s bigger issue
Raj Singh wrote:> I have limited space in my web design to display the logo of the > upcoming > event. So I put in code like this. > > file_column :image, :magick => { :versions => { "250x165" => > "250x165"}}I recommend using FlexImage: http://www.agilewebdevelopment.com/plugins/fleximage class MyImage pre_process_image :size => ''250x165'' end Generally a little easier to handle that file_column in these situations. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---