Class: VIPS::PNGReader

Inherits:
Reader
  • Object
show all
Defined in:
lib/vips/reader.rb,
ext/reader.c

Instance Attribute Summary collapse

Attributes inherited from Reader

#path

Instance Method Summary collapse

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, options={})
  @sequential = options[:sequential] || false

  super path, options
end

Instance Attribute Details

#sequentialObject

Returns the value of attribute sequential.



176
177
178
# File 'lib/vips/reader.rb', line 176

def sequential
  @sequential
end

Instance Method Details

#readObject



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