Module: Retouch
- Defined in:
- lib/retouch.rb,
lib/retouch/io.rb,
lib/retouch/cli.rb,
lib/retouch/batch.rb,
lib/retouch/gravity.rb,
lib/retouch/version.rb,
lib/retouch/geometry.rb,
lib/retouch/pipeline.rb,
lib/retouch/operations.rb,
lib/retouch/kernels/lut.rb,
lib/retouch/kernels/color.rb,
lib/retouch/operations/draw.rb,
lib/retouch/kernels/convolve.rb,
lib/retouch/operations/color.rb,
lib/retouch/operations/filter.rb,
lib/retouch/operations/multiple.rb,
sig/retouch.rbs
Defined Under Namespace
Modules: Gravity, ImageIO, Kernels, Operations
Classes: Batch, CLI, Error, Geometry, Pipeline
Constant Summary
collapse
- VERSION =
"0.3.2"
Class Method Summary
collapse
Class Method Details
.batch(inputs, to:, jobs: 1, force: false) {|arg0| ... } ⇒ Array[String]
88
89
90
91
92
93
94
95
96
97
|
# File 'lib/retouch/batch.rb', line 88
def self.batch(inputs, to:, jobs: 1, force: false, &block)
raise ArgumentError, "a transformation block is required" unless block
Batch.run(inputs, to:, jobs:, force:) do |input, output|
pipeline = block.call(Retouch.open(input))
raise TypeError, "batch block must return a Retouch::Pipeline" unless pipeline.is_a?(Pipeline)
pipeline.save(output)
end
end
|
.from_image(image) ⇒ Pipeline
28
29
30
|
# File 'lib/retouch.rb', line 28
def self.from_image(image)
Pipeline.new(image)
end
|
.open_gif(path, frame: :all, **limits) ⇒ Array[untyped], Pipeline
32
33
34
35
|
# File 'lib/retouch.rb', line 32
def self.open_gif(path, frame: :all, **limits)
result = Operations.open_gif(path, frame:, **limits)
frame == :all ? result : Pipeline.new(result)
end
|