search for: photo_data

Displaying 3 results from an estimated 3 matches for "photo_data".

2006 May 19
9
Resize uploaded image file without creating temp file?
Hi, I need to take a single uploaded image file and save three resized versions of it, a thumbnail, normal and large version. I was planning on doing this in my model by having an array of geometry strings and looping through them, each time saving a new image object resized to the correct geometry. I know that file column does similar stuff, but I would prefer to have a separate database row
2011 Aug 27
5
image override*
...le.join RAILS_ROOT, ''public'', ''images'' # Invoke save_photo method when save is completed after_save :save_photo def load_photo_file=(data) # Record the filename self.filename = data.original_filename # Store the data for later use @photo_data = data end name = File.join PHOTO_STORE, self.filename File.open(name, ''wb'') do |f| f.write(@photo_data.read) end @photo_data = nil end end end def fileexist if FileTest.exists?(RAILS_ROOT + "public/images/#{@photo_d...
2006 Apr 23
2
file_column and Thumbnails
I see that the SVN version of the excellent file_column plug-in can create thumbnails using the url_for_image_column helper. This uses Rmagick to create the thumbnail... Quick question... Let''s say the file is a TIFF image - can the helper create a JPG version of the thumbnail for display in the browser? Curious if the plug-in can handle that transform with some creative use of the