episode-182/cropper/vendor/plugins/paperclip/lib/paperclip/thumbnail.rb
# Performs the conversion of the +file+ into a thumbnail. Returns the Tempfile
# that contains the new image.
Performs the conversion of the +file+ into a thumbnail. Returns the Tempfile
that contains the new image.
Performs the conversion of the + file + into a thumbnail . Returns the Tempfile that contains the new image .
def make
      src = @file
      dst = Tempfile.new([@basename, @format].compact.join("."))
      dst.binmode
      command = <<-end_command
        #{ source_file_options }
        "#{ File.expand_path(src.path) }[0]"
        #{ transformation_command }
        "#{ File.expand_path(dst.path) }"
      end_command
      begin
        success = Paperclip.run("convert", command.gsub(/\s+/, " "))
      rescue PaperclipCommandLineError
        raise PaperclipError, "There was an error processing the thumbnail for #{@basename}" if @whiny
      end
      dst
    end
def make src = @file dst = Tempfile . new ( [ @basename , @format ] . compact . join ( "." ) ) dst . binmode command = <<-end_command #{ source_file_options } 
        " #{ File . expand_path ( src . path ) } [0]"
         #{ transformation_command } 
        " #{ File . expand_path ( dst . path ) } "
       end_command begin success = Paperclip . run ( "convert" , command . gsub ( / \s + / , " " ) ) rescue PaperclipCommandLineError raise PaperclipError , "There was an error processing the thumbnail for #{@basename}" if @whiny end dst end
Performs the conversion of the +file+ into a thumbnail.
Performs the conversion of the + file + into a thumbnail .