A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/eltiare/carrierwave-vips below:

eltiare/carrierwave-vips: CarrierWave image processing powered by VIPS

This project has been archived. CarrierWave now has first-class support for VIPS: https://github.com/carrierwaveuploader/carrierwave#using-vips

The original instructions are below for anyone still reliant on this library. You are encouraged to update to the built in methods instead of this code.

Debian does not have a library for VIPS 8 yet. As soon as I can work out how to get it in a Travis build the tests should pass. In the meantime you can clone this repo yourself and run rspec in the base directory.

This adds support to CarrierWave for the ultrafast and resource efficient VIPS library.

gem install carrierwave-vips

If you need support for VIPS 7 please install a 1.0.x version of this gem. You will also need ruby-vips for VIPS 8. For instructions on how to install that see the repo: https://github.com/jcupitt/ruby-vips

If you are using bundler, add this to your Gemfile:

You will need to install the rmagick gem if you want to load GIF files. Writing GIFs is not supported by ruby-vips or this library.

See the instructions for CarrierWave to use this processor. You will need to include the Vips module in the upload class:

class AvatarUploader < CarrierWave::Uploader::Base
  include CarrierWave::Vips
end

You can use the following methods to change your images.

To see how vips stands up to other image processing libraries, see this benchmark: https://github.com/stanislaw/carrierwave-vips-benchmarks

When reducing the size of images, a sharpening mask is used. To change or disable this behavior:

CarrierWave::Vips.configure do |c|
  c.sharpen_mask = false  # Disable sharpening mask on image reduction
  c.sharpen_mask = [      # Default mask
    [ -1, -1, -1 ], 
    [ -1, 24, -1 ], 
    [ -1, -1, -1 ] 
  ]
  c.sharpen_scale = 16     
end

See VIPS::Image.new_from_array for more information on what these two do.

If you use convert this library overrides the filename method used by CarrierWave to give the proper extension to the upload. If you want to override this method yourself, you can use the format_override method to get the file extension.

Libraries which rely on CarrierWave-VIPS

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4