Class: VIPS::TIFFReader
- Defined in:
- lib/vips/reader.rb,
ext/reader.c
Instance Attribute Summary collapse
-
#page_number ⇒ Object
Returns the value of attribute page_number.
-
#sequential ⇒ Object
Returns the value of attribute sequential.
Attributes inherited from Reader
Instance Method Summary collapse
-
#initialize(path, options = {}) ⇒ TIFFReader
constructor
Create a tiff image file reader.
- #read ⇒ Object
Methods inherited from Reader
Methods included from Header
#band_fmt, #bands, #exif, #exif?, #get, #icc, #icc?, #n_elements, #set, #sizeof_element, #sizeof_line, #sizeof_pel, #x_offset, #x_res, #x_size, #y_offset, #y_res, #y_size
Constructor Details
#initialize(path, options = {}) ⇒ TIFFReader
Create a tiff image file reader.
119 120 121 122 123 124 125 |
# File 'lib/vips/reader.rb', line 119 def initialize(path, ={}) @page_number = nil @sequential = [:sequential] || false self.page_number = [:page_number] if .has_key?(:page_number) super path, end |
Instance Attribute Details
#page_number ⇒ Object
Returns the value of attribute page_number.
115 116 117 |
# File 'lib/vips/reader.rb', line 115 def page_number @page_number end |
#sequential ⇒ Object
Returns the value of attribute sequential.
116 117 118 |
# File 'lib/vips/reader.rb', line 116 def sequential @sequential end |
Instance Method Details
#read ⇒ Object
127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/vips/reader.rb', line 127 def read str = "#{@path}:" str << "#{@page_number}" if @page_number seq = 0 if Vips.sequential_mode_supported? str << "," str << "sequential" if @sequential seq = 1 end @_im = read_internal str, seq end |