search for: resize_to

Displaying 8 results from an estimated 8 matches for "resize_to".

2006 Jan 11
0
File_column : how can I resize/convert/whatever an image according to form-submitted values?
...rtain transformations of the image before saving it - most importantly, to resize it. Now, how can I make an instance of FileColumn enabled model process these imagemagick instructions? My model looks looks somewhat like : class Image < ActiveRecord::Base attr_accessor :resize_dimension, :resize_to before_save :resize_image file_column :path, :versions => { "thumbnail" => "100x100>" } private def resize_image # stuff that processes the image with the form-provided values [:resize_dimension] (can be "w" (width) or "h" (height) ) and...
2010 Apr 24
2
problem using attachment_fu with S3
...from or written to within the timeout period. Idle connections will be closed. hope someone can help out or pint me to an application that works. i have attached my db file. in my model I have has_attachment :content_type => :image, :storage => :s3, :size => 0.megabyte..3.megabytes, :resize_to => ''450x450>'', :thumbnails => { :thumb => ''150x150>'' } validates_as_attachment my view new <h1>New upload_file</h1> <%= error_messages_for :upload_file %> <% form_for(:upload_file, :url => upload_files_path, :html => { :...
2007 Mar 28
3
attachment_fu Not Resizing
...esizing them and I don''t know what''s changed. Here''s my code: class Product < ActiveRecord::Base has_attachment :content_type => :image, :storage => :file_system, :max_size => 18.megabytes, :resize_to => ''300x'', :thumbnails => { :thumb => ''61x110!'' } validates_as_attachment end I expected a 420x595 image to be resized to 300xWhatever and a 61x110 thumbnail to be created. The image and thumbnail product records were both...
2007 Apr 08
13
attachment_fu thumbnail not created
...perfectly except the thumbnail column in my DB is alwas NULL. I''m using S3 as my storage system. Anyone else having this issue with thumbnails? has_attachment :content_type => :image, :storage => :s3, :max_size => 500.kilobytes, :resize_to => ''150x150>'', :thumbnails => { :thumb => ''40x40>'' }, :processor => ''Rmagick'' validates_as_attachment --~--~---------~--~----~------------~-------~--~----~ You received this message because...
2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested. But, I added some code to that model that I do need to test. Basically, I need to somehow fulfill the "uploaded_data" property so I can actually run my tests(otherwise they fail because of validations). The "uploaded_data" field is what would grab the multipart data from form. Here
2007 Dec 02
0
attachment_fu doesn't generate thumbnails on windows
...ginal image. My Mugshot class looks like class Mugshot < ActiveRecord::Base has_attachment :content_type => :image, :storage => :file_system, :processor => ''Rmagick'', :max_size => 6.megabytes, :resize_to => ''100x100>'', :thumbnails => { :thumb => ''30x30>'', :tiny => ''10x10>'' } validates_as_attachment end Is there something I''m missing here? Cheers Shaun -- Posted via http://www.ruby-forum.com/....
2008 May 28
1
Attachment_fu, polymorphism and customization
Hi, I got Image model that has_attachment and belongs_to 2 other models via polymorphic association. The problem is that I''d like to customize has_attachment options (resize image) depending on which model the Image is related to - i.e. if Image belongs to Article it should be resized using different settings than if it belongs to Header. Is there a smart way to do it or do I have to
2008 Nov 26
0
Best Configuration for attachment fu (images)
...t resizing option and the best "thumbnail" size for large images. This is my current configuration. When I resize strictly to 640x480 the image loses its original ratio. has_attachment :content_type => :image, :storage => :file_system, :max_size => 4096.kilobytes, :resize_to => ''640x480'', :thumbnails => { :thumb => ''32x32'', :medium => ''96x96'', :large => ''320x240''}, :processor => :ImageScience . Thanks, ElĂ­as --~--~---------~--~----~------------~-------~--~----~ You r...