From 9e72bc022db09750f3de9a95de833500dcf156ce Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 23 Oct 2011 15:27:02 -0400 Subject: [PATCH] fix problem with negative heights on flash files --- vendor/plugins/imagesize/lib/image_size.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vendor/plugins/imagesize/lib/image_size.rb b/vendor/plugins/imagesize/lib/image_size.rb index 149cc60b8..d53d322a1 100755 --- a/vendor/plugins/imagesize/lib/image_size.rb +++ b/vendor/plugins/imagesize/lib/image_size.rb @@ -272,6 +272,8 @@ class ImageSize y_max = Integer("0b#{str[(last += bit_length),bit_length]}") width = (x_max - x_min)/20 height = (y_max - y_min)/20 + width *= -1 if width < 0 + height *= -1 if height < 0 [width, height] end end