gifsicle.rb
# this method is lifted from image_processing gem
# copies the original image to a tempfile because we don't want to mess with the original
this method is lifted from image_processing gem
copies the original image to a tempfile because we don't want to mess with the original
this method is lifted from image_processing gem copies the original image to a tempfile because we don ' t want to mess with the original
def _copy_to_tempfile(file)
          args = [File.basename(file.path, ".*"), File.extname(file.path)] if file.respond_to?(:path)
          tempfile = Tempfile.new(args || "image", binmode: true)
          IO.copy_stream(file, tempfile.path)
          file.rewind
          tempfile
        end
def _copy_to_tempfile ( file ) args = [ File . basename ( file . path , ".*" ) , File . extname ( file . path ) ] if file . respond_to? ( :path ) tempfile = Tempfile . new ( args || "image" , binmode : true ) IO . copy_stream ( file , tempfile . path ) file . rewind tempfile end
this method is lifted from image_processing gem
copies the original image to a tempfile because we don't want to mess with the original
this method is lifted from image_processing gem copies the original image to a tempfile because we don ' t want to mess with the original
file