bcaccinolo (owner)

Revisions

gist: 169214 Download_button fork
public
Public Clone URL: git://gist.github.com/169214.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- a/lib/technoweenie/attachment_fu/processors/gd2_processor.rb
+++ b/lib/technoweenie/attachment_fu/processors/gd2_processor.rb
@@ -12,7 +12,9 @@ module Technoweenie # :nodoc:
         module ClassMethods
           # Yields a block containing a GD2 Image for the given binary data.
           def with_image(file, &block)
- im = GD2::Image.import(file)
+ f = File.open(file)
+ im = GD2::Image.load(f)
+ f.close
             block.call(im)
           end
         end
@@ -51,4 +53,4 @@ module Technoweenie # :nodoc:
       end
     end
   end
-end
\ No newline at end of file
+end