Class: VIPS::PNGReader
- Defined in:
- lib/vips/reader.rb,
ext/reader.c
Instance Attribute Summary collapse
-
#sequential ⇒ Object
Returns the value of attribute sequential.
Attributes inherited from Reader
Instance Method Summary collapse
-
#initialize(path, options = {}) ⇒ PNGReader
constructor
Create a png image file reader.
- #read ⇒ Object
Methods inherited from Reader
#exif, #exif?, recognized?, #x_size, #y_size
Constructor Details
#initialize(path, options = {}) ⇒ PNGReader
Create a png image file reader.
179 180 181 182 183 |
# File 'lib/vips/reader.rb', line 179 def initialize(path, ={}) @sequential = [:sequential] || false super path, end |
Instance Attribute Details
#sequential ⇒ Object
Returns the value of attribute sequential.
176 177 178 |
# File 'lib/vips/reader.rb', line 176 def sequential @sequential end |
Instance Method Details
#read ⇒ Object
185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/vips/reader.rb', line 185 def read str = "#{@path}:" seq = 0 if VIPS.sequential_mode_supported? str << "sequential" if @sequential seq = 1 end @_im = read_retry str, seq end |