mitukiii / nude.rb

Port of nude.js to Ruby.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nude

Port of nude.js to Ruby.

Requirements

  • ImageMagick

Installation

Add this line to your application's Gemfile:

gem 'nude'

And then execute:

$ bundle

Or install it yourself as:

$ gem install nude

Usage

require 'nude'

puts Nude.nude?('/path/to/image1.jpg')
# => true

n = Nude.parse('/path/to/image2.jpg')
puts n.nude?
# => false
puts n.inspect
# => #<Nude @result=false, @message="Total skin parcentage lower than 15 (10%)", @image=/path/to/image2.jpg JPEG 500x375 500x375+0+0 DirectClass 8-bit 108kb>

Contributing

  1. Fork it
  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

Copyright

Copyright (c) 2012 Kazuya Takeshima. See LICENSE for details.

About

Port of nude.js to Ruby.

License:MIT License


Languages

Language:Ruby 100.0%