From a2f102665916933c3bcb081c0d6f107dec784d7a Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sun, 12 Sep 2010 14:13:41 -0700 Subject: [PATCH] This is a whole lot faster --- lib/lemonade/sass_functions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lemonade/sass_functions.rb b/lib/lemonade/sass_functions.rb index e41b6325..d883f667 100644 --- a/lib/lemonade/sass_functions.rb +++ b/lib/lemonade/sass_functions.rb @@ -94,7 +94,7 @@ private image[:margin_top] = margin_top if margin_top > image[:margin_top] image[:margin_bottom] = margin_bottom if margin_bottom > image[:margin_bottom] else - width, height = ChunkyPNG::Image.from_file(file).size + width, height = ImageProperties.new(file).size x = (position_x and position_x.numerator_units == %w(%)) ? position_x : Sass::Script::Number.new(0) y = sprite[:height] + margin_top y = Sass::Script::Number.new(y, y == 0 ? [] : ['px'])