public
Description: Rails plugin for uploading images as resources, with support for resizing, text stamping, and other special effects.
Homepage: http://fleximage.rubyforge.org
Clone URL: git://github.com/Squeegy/fleximage.git
Fixed a bug that magic width and height columns would not reflect the 
attributes of an image that was resized with a preprocess_image operation
Squeegy (author)
Sat Apr 19 12:59:14 -0700 2008
commit  9c53eb492d3cb333a089aa523b08e29c82836dfc
tree    f9c3dd7f6dcc7ec68c70f5f69d060c471a1718ec
parent  8c487221ff29dc287e219246a8e594ea3dcd8e7c
...
407
408
409
 
410
411
412
413
414
415
416
 
 
417
418
419
...
407
408
409
410
411
412
413
414
415
 
 
416
417
418
419
420
0
@@ -407,13 +407,14 @@ module Fleximage
0
         def perform_preprocess_operation
0
           if self.class.preprocess_image_operation
0
             operate(&self.class.preprocess_image_operation)
0
+ set_magic_attributes #update width and height magic columns
0
             @uploaded_image = @output_image
0
           end
0
         end
0
         
0
         # If any magic column names exists fill them with image meta data.
0
- def set_magic_attributes(file)
0
- if self.respond_to?(:image_filename=)
0
+ def set_magic_attributes(file = nil)
0
+ if file && self.respond_to?(:image_filename=)
0
             filename = file.original_filename if file.respond_to?(:original_filename)
0
             filename = file.basename if file.respond_to?(:basename)
0
             self.image_filename = filename
...
14
15
16
17
18
...
14
15
16
 
17
0
@@ -14,5 +14,4 @@ class FleximageMagicColumnsTest < Test::Unit::TestCase
0
     assert_equal 110, p.image_height
0
     assert_equal 276, p.image_width
0
   end
0
-
0
 end

Comments

    No one has commented yet.