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
#exif, #exif?, recognized?, #x_size, #y_size
Constructor Details
#initialize(path, options = {}) ⇒ TIFFReader
Create a tiff image file reader.
142 143 144 145 146 147 148 |
# File 'lib/vips/reader.rb', line 142 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.
138 139 140 |
# File 'lib/vips/reader.rb', line 138 def page_number @page_number end |
#sequential ⇒ Object
Returns the value of attribute sequential.
139 140 141 |
# File 'lib/vips/reader.rb', line 139 def sequential @sequential end |
Instance Method Details
#read ⇒ Object
150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/vips/reader.rb', line 150 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_retry str, seq end |