Module: Imogen
- Extended by:
- FFI::Library
- Defined in:
- lib/imogen.rb,
lib/imogen/dzi.rb,
lib/imogen/iiif.rb,
lib/imogen/zoomable.rb,
lib/imogen/auto_crop.rb,
lib/imogen/iiif/size.rb,
lib/imogen/iiif/tiles.rb,
lib/imogen/iiif/region.rb,
lib/imogen/iiif/rotation.rb
Defined Under Namespace
Modules: AutoCrop, Cropped, Dzi, Iiif, Scaled, Zoomable
Class Method Summary
collapse
Class Method Details
35
36
37
|
# File 'lib/imogen.rb', line 35
def self.format_from(image_path)
raise "format from path not implemented"
end
|
.from(src_path) {|Vips::Image.matload(src_path)| ... } ⇒ Object
15
16
17
|
# File 'lib/imogen.rb', line 15
def self.from(src_path)
yield Vips::Image.matload(src_path)
end
|
.image(src_path, opts = {}) ⇒ Object
45
46
47
48
49
50
51
|
# File 'lib/imogen.rb', line 45
def self.image(src_path, opts = {})
if opts.empty?
Vips::Image.new_from_file(src_path)
else
Vips::Image.new_from_file(src_path, **opts)
end
end
|
.with_image(src_path, opts = {}, &block) ⇒ Object
59
60
61
|
# File 'lib/imogen.rb', line 59
def self.with_image(src_path, opts = {}, &block)
block.yield(image(src_path, opts))
end
|