Module: Imogen

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

.format_from(image_path) ⇒ Object



25
26
27
# File 'lib/imogen.rb', line 25

def self.format_from(image_path)
  raise "format from path not implemented"
end

.from(src_path) {|Vips::Image.matload(src_path)| ... } ⇒ Object

Yields:

  • (Vips::Image.matload(src_path))


5
6
7
# File 'lib/imogen.rb', line 5

def self.from(src_path)
  yield Vips::Image.matload(src_path)
end

.image(src_path, flags = 0) ⇒ Object



29
30
31
# File 'lib/imogen.rb', line 29

def self.image(src_path, flags=0)
  Vips::Image.new_from_file(src_path)
end

.with_image(src_path, flags = 0, &block) ⇒ Object



32
33
34
# File 'lib/imogen.rb', line 32

def self.with_image(src_path, flags = 0, &block)
  block.yield(image(src_path, flags))
end