public
Description: Miso is a unified API for simple image operations commonly used on the web.
Homepage: http://fingertips.github.com
Clone URL: git://github.com/Fingertips/Miso.git
Miso /
name age message
file .gitignore Tue Oct 20 08:42:30 -0700 2009 Add a gemspec. [Manfred]
file .kick Tue Oct 20 07:58:56 -0700 2009 Complete the specs an make them run. - Fix spe... [Manfred]
file LICENSE Tue Oct 20 05:28:56 -0700 2009 Start working on actual implementation. - Adde... [Manfred]
file README Wed Oct 21 05:32:26 -0700 2009 Fix formatting [alloy]
file Rakefile Wed Oct 21 02:09:32 -0700 2009 Don't include all files in the gem. [alloy]
file TODO Thu Nov 26 03:12:56 -0800 2009 Added TODO about rounfing in the CI processor. [alloy]
file VERSION Mon Nov 30 05:20:28 -0800 2009 Version bump to 0.2.1 [alloy]
directory lib/ Mon Nov 30 05:18:37 -0800 2009 Be case insensitive about the image types the C... [alloy]
file miso.gemspec Mon Nov 30 05:20:28 -0800 2009 Version bump to 0.2.1 [alloy]
directory spec/ Mon Nov 30 05:18:37 -0800 2009 Be case insensitive about the image types the C... [alloy]
README
(...) Miso

Miso is a unified API for simple image operations commonly used on the web. It
provides backends for often used graphic libraries, but it's also pretty easy
to plug in your own backend.

A unified API is helpful when you run your code on a number of different boxes
and architectures. For instance, you could develop your web application on your
Mac with the Core Image backend [1] and deploy to your Linux server with an
ImageMagick backend. You could even have the API talk to your custom
distributed image processing backend.

[1] Note how this means you will never have to install ImageMagick again (;


: INSTALL

  $ gem install miso --source http://gemcutter.org


: EXAMPLES

Miso can be used in three different ways, each useful in different situations.

  1. For the quick crop
  
    Miso::Image.crop('input.jpg', 'output.jpg', 120, 100)
  
  2. For the elaborate business logic
  
    @image = Miso::Image.new('input.jpg')
    @image.crop(120, 100) if options[:crop]
    @image.fit(120, 100) if options[:fit]
    @image.write('output.jpg')
  
  3. As an option
  
    class Attachment
      has_variant :avatar,
        :processor => Miso::Image.factory.crop(120, 100).fit(60, 40)
    end
    
  Which works like this;
    
    factory = Miso::Image.factory.crop(123, 456)
    factory.apply('input.jpg', 'output.jpg')

But wait, there is more! Read the API documentation for more goodies.


: SUPPORTED BACKENDS

Currently supported backends are: Core Image and ImageMagick, because those
are the ones we use. If you want to contribute backends we're happy to
accept patches!


: ENDORSEMENTS

  @garyyuen: ‘miso with indian flavors. seems ok.’
  @Oracl: ‘@veganza I love miso! :)’
  @lehudgins: ‘ok fine. Miso totally does go kinda bad after a year.’
  Wikipedia: ‘High in protein and rich in vitamins and minerals, miso played an
              important nutritional role in feudal Japan.’