No commit activity in last 3 years
No release in over 3 years
Additional processing support for MiniMagick and RMagick
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 3.0.0.beta1

Runtime

 Project Readme

CarrierWave::Processing

Travis CI

Additional processing support for MiniMagick and RMagick. These are processors that I've been using in multiple projects so I decided to extract those as a gem.

Installation

Add this line to your application's Gemfile:

gem 'carrierwave-processing'

And then execute:

$ bundle

Or install it yourself as:

$ gem install carrierwave-processing

Usage

This gem add several useful methods to CarrierWave processing RMagick and MiniMagick modules: quality, strip, blur and colorspace. To use those, you should include specified module (RMagick or MiniMagick) into your uploader and use processors:

class AvatarUploader < CarrierWave::Uploader::Base
  include CarrierWave::RMagick
  include CarrierWave::Processing::RMagick

  process :strip # strip image of all profiles and comments
  process :resize_to_fill => [200, 200]
  process :quality => 90 # Set JPEG/MIFF/PNG compression level (0-100)
  process :convert => 'png'
  process :colorspace => :rgb # Set colorspace to rgb or cmyk
  process :blur => [0, 8] #reduce image noise and reduce detail levels [radius,sigma]
  process :auto_orient # Rotate the image if it has orientation data

  def filename
    super.chomp(File.extname(super)) + '.png'
  end
end

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