public
Fork of technoweenie/attachment_fu
Description: Treat an ActiveRecord model as a file attachment, storing its patch, size, content type, etc.
Homepage: http://weblog.techno-weenie.net
Clone URL: git://github.com/nicksieger/attachment_fu.git
Search Repo:
change the filename's extension, not just the temp file

git-svn-id: 
http://svn.techno-weenie.net/projects/plugins/attachment_fu@2878 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Thu May 31 08:18:07 -0700 2007
commit  460d5782c32f6fa6ee3b4265999f1a41bdae143b
tree    922ba96c1ebc3be41f1f9914e08298e351fb9446
parent  902202e36308cf285cbfb5e7299a8bfa50d0e661
...
28
29
30
 
31
32
33
34
35
 
36
37
38
...
28
29
30
31
32
33
34
35
 
36
37
38
39
0
@@ -28,11 +28,12 @@ module Technoweenie # :nodoc:
0
           # Performs the actual resizing operation for a thumbnail
0
           def resize_image(img, size)
0
             # create a dummy temp file to write to
0
+ filename.sub! /gif$/, 'png'
0
             self.temp_path = write_to_temp_file(filename)
0
             grab_dimensions = lambda do |img|
0
               self.width = img.width if respond_to?(:width)
0
               self.height = img.height if respond_to?(:height)
0
- img.save temp_path.sub(/gif$/, 'png')
0
+ img.save temp_path
0
               callback_with_args :after_resize, img
0
             end
0
 

Comments

    No one has commented yet.