Skip to content

vinu/blitline

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

You must first have a Blitline.com account to successfully use the gem. You can obtain one (free) by going to www.blitline.com

Once you have your account, you will need to find you ACCOUNT_ID which you can get by logging in and clicking on the Account tab.

In you application environment, install the Blitline gem or add the Blitline gem to your Gemfile

$ gem install blitline

or…if you have a Gemfile

gem 'blitline'

Once the gem is installed, you can start a Rails console and try the following:

$ job = Blitline::Job.new("http://www.google.com/logos/2011/yokoyama11-hp.jpg") # My source file to manipulate
$ job.application_id = "ACCOUNT_ID" # This ACCOUNT_ID needs to be your account ID from Blitline which you got from Blitline.com above
$ blur_function = job.add_function("blur", {:radius => 1}) # Add a blur function
$ blur_function.add_save("my_first_image") # Adds a save function (which takes a string parameter which is what the image is identified as on callback/polling)
$ blitline_service = Blitline.new
$ blitline_service.jobs << job # Push job into service
$ blitline_service.post_jobs

And you will get JSON back describing where the resulting image will be located There are many more things you can do with images (including pushing them to your own S3 buckets).

You can find documentation about Blitline.com and it’s services by following the links below Further reading:

About

Image processing in the cloud ruby gem

Resources

License

Stars

Watchers

Forks

Packages

No packages published