Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
=== vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb ================================================================== --- vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb (revision 12426) +++ vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb (local) @@ -41,7 +41,7 @@ if size.is_a?(Fixnum) || (size.is_a?(Array) && size.first.is_a?(Fixnum)) if size.is_a?(Fixnum) size = [size, size] - img.resize(size.join('x')) + size[0] == size[1] ? img.crop("#{size[0]}x#{size[1]}+0+0\" -gravity \"Center") : img.resize(size.join('x')) else img.resize(size.join('x') + '!') end
This paste will be private.
From the Design Piracy series on my blog: