public
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/technoweenie/attachment_fu.git
Click here to lend your support to: attachment_fu and make a donation at www.pledgie.com !
ensure width/height get set by imagescience if no resizing or thumbnailing 
is performed [lifo]

git-svn-id: 
http://svn.techno-weenie.net/projects/plugins/attachment_fu@2876 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Fri May 25 13:10:47 -0700 2007
commit  4eebedc059d218521aee35fa63222ae23369d3f1
tree    7c4e515a15eeced9c9a935e6bd3c06eeae026366
parent  87eab0655a162c727d8b423c706f90c4078ebe8f
...
18
19
20
21
 
 
 
 
 
22
23
24
...
18
19
20
 
21
22
23
24
25
26
27
28
0
@@ -18,7 +18,11 @@ module Technoweenie # :nodoc:
0
         protected
0
           def process_attachment_with_processing
0
             return unless process_attachment_without_processing && image?
0
- with_image { |img| resize_image_or_thumbnail! img }
0
+ with_image do |img|
0
+ self.width = img.width if respond_to?(:width)
0
+ self.height = img.height if respond_to?(:height)
0
+ resize_image_or_thumbnail! img
0
+ end
0
           end
0
 
0
           # Performs the actual resizing operation for a thumbnail

Comments

    No one has commented yet.