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
    
      
  
  
    .clear_vips_cache_mem  ⇒ Object 
  
  
  
  
  
    | 
61
62
63
64
65
66
67
68
69
70 | # File 'lib/imogen.rb', line 61
def self.clear_vips_cache_mem
  
  original_max_value = vips_cache_get_max_mem
  
  vips_cache_set_max_mem(0)
  
  vips_cache_set_max_mem(original_max_value)
end
 | 
 
    
      
  
  
    | 
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 
  
  
  
  
    | 
42
43
44
45
46
47
48
49 | # File 'lib/imogen.rb', line 42
def self.image(src_path, opts = {})
  
  
  
  
  clear_vips_cache_mem if opts[:nocache] == true
  Vips::Image.new_from_file(src_path)
end
 | 
 
    
      
  
  
    .with_image(src_path, opts = {}, &block)  ⇒ Object 
  
  
  
  
    | 
54
55
56 | # File 'lib/imogen.rb', line 54
def self.with_image(src_path, opts = {}, &block)
  block.yield(image(src_path, opts))
end
 |