From de06a0dd5535cd8a946fa03aa71c88d391c22b47 Mon Sep 17 00:00:00 2001 From: James Kebinger Date: Thu, 18 Sep 2008 15:17:05 -0400 Subject: [PATCH] pass argument record and img arguments to after resize callback --- .../processors/core_image_processor.rb | 2 +- .../attachment_fu/processors/gd2_processor.rb | 2 +- .../processors/image_science_processor.rb | 2 +- .../processors/mini_magick_processor.rb | 2 +- .../attachment_fu/processors/rmagick_processor.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/technoweenie/attachment_fu/processors/core_image_processor.rb b/lib/technoweenie/attachment_fu/processors/core_image_processor.rb index 2672e37..a972d41 100644 --- a/lib/technoweenie/attachment_fu/processors/core_image_processor.rb +++ b/lib/technoweenie/attachment_fu/processors/core_image_processor.rb @@ -22,7 +22,7 @@ module Technoweenie # :nodoc: self.width = img.extent.size.width if respond_to?(:width) self.height = img.extent.size.height if respond_to?(:height) resize_image_or_thumbnail! img - callback_with_args :after_resize, img + callback_with_args :after_resize, [self,img] end if image? end diff --git a/lib/technoweenie/attachment_fu/processors/gd2_processor.rb b/lib/technoweenie/attachment_fu/processors/gd2_processor.rb index d120b25..cbe9f9f 100644 --- a/lib/technoweenie/attachment_fu/processors/gd2_processor.rb +++ b/lib/technoweenie/attachment_fu/processors/gd2_processor.rb @@ -24,7 +24,7 @@ module Technoweenie # :nodoc: resize_image_or_thumbnail! img self.width = img.width self.height = img.height - callback_with_args :after_resize, img + callback_with_args :after_resize, [self,img] end end diff --git a/lib/technoweenie/attachment_fu/processors/image_science_processor.rb b/lib/technoweenie/attachment_fu/processors/image_science_processor.rb index 6f27833..ec8bf9b 100644 --- a/lib/technoweenie/attachment_fu/processors/image_science_processor.rb +++ b/lib/technoweenie/attachment_fu/processors/image_science_processor.rb @@ -40,7 +40,7 @@ module Technoweenie # :nodoc: self.height = img.height if respond_to?(:height) img.save self.temp_path self.size = File.size(self.temp_path) - callback_with_args :after_resize, img + callback_with_args :after_resize, [self,img] end size = size.first if size.is_a?(Array) && size.length == 1 diff --git a/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb b/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb index 668a720..10f2538 100644 --- a/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb +++ b/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb @@ -31,7 +31,7 @@ module Technoweenie # :nodoc: resize_image_or_thumbnail! img self.width = img[:width] if respond_to?(:width) self.height = img[:height] if respond_to?(:height) - callback_with_args :after_resize, img + callback_with_args :after_resize, [self,img] end if image? end diff --git a/lib/technoweenie/attachment_fu/processors/rmagick_processor.rb b/lib/technoweenie/attachment_fu/processors/rmagick_processor.rb index aa83b29..f6a5986 100644 --- a/lib/technoweenie/attachment_fu/processors/rmagick_processor.rb +++ b/lib/technoweenie/attachment_fu/processors/rmagick_processor.rb @@ -32,7 +32,7 @@ module Technoweenie # :nodoc: resize_image_or_thumbnail! img self.width = img.columns if respond_to?(:width) self.height = img.rows if respond_to?(:height) - callback_with_args :after_resize, img + callback_with_args :after_resize, [self,img] end if image? end -- 1.5.5.3