Project

morandi

0.0
A long-lived project that still receives updates
Apply simple edits to images
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 4.0
~> 1.0
~> 4.0
 Project Readme

Morandi

Library of simple image manipulations - replicating the behaviour of morandi-js.

Installation

Install liblcms2-utils to provide the jpgicc command used by Morandi::ProfiledPixbuf.

Add this line to your application's Gemfile:

gem 'morandi'

And then execute:

$ bundle

Or install it yourself as:

$ gem install morandi

Usage

   Morandi.process(source, options, target_path)

For the detailed documentation of options see lib/morandi.rb

Contributing

  1. Fork it ( http://github.com/livelink/morandi-rb/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Development

Development happens inside a docker image, with a Makefile provided as a simple CLI.

Build the image and run the container

make

Above launches guard, which automatically runs tests when any file changes.

Run the full test suite manually from the guard prompt

all

Run an individual test

Add the focus: true annotation to an example or describe block.

Open a bash shell in the container

Useful, for example, to run rubocop:

make shell

Note

The image builds and the gem works on ARM platform, but a few specs fail with tiny rendering output mismatches.

CI uses AMD64 and is a source of truth for the specs