Index: test/processors/core_image_test.rb =================================================================== --- test/processors/core_image_test.rb (revision 3183) +++ test/processors/core_image_test.rb (working copy) @@ -22,6 +22,12 @@ # test geometry string assert_equal 31, geo.width assert_equal 41, geo.height + + # This makes sure that we didn't overwrite the original file + # and will end up with a thumbnail instead of the original + assert_equal 42, attachment.width + assert_equal 55, attachment.height + end else def test_flunk Index: lib/technoweenie/attachment_fu/processors/core_image_processor.rb =================================================================== --- lib/technoweenie/attachment_fu/processors/core_image_processor.rb (revision 3183) +++ lib/technoweenie/attachment_fu/processors/core_image_processor.rb (working copy) @@ -44,6 +44,9 @@ processor.render do |result| self.width = result.extent.size.width if respond_to?(:width) self.height = result.extent.size.height if respond_to?(:height) + + # Get a new temp_path for the image before saving + self.temp_path = Tempfile.new(random_tempfile_filename, Technoweenie::AttachmentFu.tempfile_path).path result.save self.temp_path, OSX::NSJPEGFileType self.size = File.size(self.temp_path) end