You've already forked image_processing
mirror of
https://github.com/usetrmnl/image_processing.git
synced 2026-04-29 13:33:11 -07:00
01f856a29e
In certain cases processors need to know the source/destination format, e.g. when they need to perform different operations for different formats. So we refactor the pipeline class and initialize processors with it. With this we also create a separate Builder class, whose sole purpose is to build options and call the pipeline with those options. This is an improvement, because previously the Pipeline class was also acting like a builder by including Chainable. This was making the Pipeline class difficult to change, as Chainable#method_missing was swallowing any typos. It was also making it impossible to refactor, because we would risk the new methods clashing with VIPS/ImageMagick operation names.
13 lines
341 B
Ruby
13 lines
341 B
Ruby
require "image_processing/chainable"
|
|
require "image_processing/builder"
|
|
require "image_processing/pipeline"
|
|
require "image_processing/processor"
|
|
require "image_processing/version"
|
|
|
|
module ImageProcessing
|
|
Error = Class.new(StandardError)
|
|
|
|
autoload :MiniMagick, 'image_processing/mini_magick'
|
|
autoload :Vips, 'image_processing/vips'
|
|
end
|