Sha256: 61e1d8f53043f0e12812790a0af9ab3322ab4e205aa6c71faa471c17f03982ad

Contents?: true

Size: 1.46 KB

Versions: 42

Compression:

Stored size: 1.46 KB

Contents

#!/usr/bin/env ruby -rubygems

require 'restclient'
require 'json'

# This example demonstrates the GraphicsMagick action by taking in a list of
# five images, and producing annotated, blurred, and black and white versions
# of each image. See actions/graphics_magick.rb

RestClient.post('http://localhost:9173/jobs', 
  {:job => {
  
    'action' => 'graphics_magick',
    
    'inputs' => [
      'http://www.sci-fi-o-rama.com/wp-content/uploads/2008/10/dan_mcpharlin_the_land_of_sleeping_things.jpg',
      'http://www.sci-fi-o-rama.com/wp-content/uploads/2009/07/dan_mcpharlin_wired_spread01.jpg',
      'http://www.sci-fi-o-rama.com/wp-content/uploads/2009/07/dan_mcpharlin_wired_spread03.jpg',
      'http://www.sci-fi-o-rama.com/wp-content/uploads/2009/07/dan_mcpharlin_wired_spread02.jpg',
      'http://www.sci-fi-o-rama.com/wp-content/uploads/2009/02/dan_mcpharlin_untitled.jpg'
    ],
    
    'options' => {
      'steps' => [{
        'name'      => 'annotated',
        'command'   => 'convert',
        'options'   => '-font helvetica -fill red -draw "font-size 35; text 75,75 CloudCrowd!"',
        'extension' => 'jpg'
      },{
        'name'      => 'blurred',
        'command'   => 'convert',
        'options'   => '-blur 10x5',
        'extension' => 'png'
      },{
        'name'      => 'bw', 
        'input'     => 'blurred',
        'command'   => 'convert', 
        'options'   => '-monochrome', 
        'extension' => 'jpg'
      }]
    }
    
  }.to_json}
)

Version data entries

42 entries across 42 versions & 3 rubygems

Version Path
cloud-crowd-0.7.6 examples/graphics_magick_example.rb
cloud-crowd-0.7.5 examples/graphics_magick_example.rb
documentcloud-cloud-crowd-0.0.6 examples/graphics_magick_example.rb
documentcloud-cloud-crowd-0.1.0 examples/graphics_magick_example.rb
documentcloud-cloud-crowd-0.1.1 examples/graphics_magick_example.rb
documentcloud-cloud-crowd-0.2.0 examples/graphics_magick_example.rb
documentcloud-cloud-crowd-0.2.1 examples/graphics_magick_example.rb
documentcloud-cloud-crowd-0.2.2 examples/graphics_magick_example.rb
documentcloud-cloud-crowd-0.2.3 examples/graphics_magick_example.rb
cloud-crowd-0.7.3 examples/graphics_magick_example.rb
cloud-crowd-0.7.2 examples/graphics_magick_example.rb
cloud-crowd-0.7.2.beta examples/graphics_magick_example.rb
cloud-crowd-0.7.2.pre3 examples/graphics_magick_example.rb
cloud-crowd-0.7.2.pre2 examples/graphics_magick_example.rb
cloud-crowd-0.7.2.pre examples/graphics_magick_example.rb
cloud-crowd-0.7.1 examples/graphics_magick_example.rb
cloud-crowd-0.7.0 examples/graphics_magick_example.rb
cloud-crowd-0.7.0.pre examples/graphics_magick_example.rb
cloud-crowd-0.6.2 examples/graphics_magick_example.rb
cloud-crowd-0.6.1 examples/graphics_magick_example.rb