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

recognized?, #x_size, #y_size

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 = {}) ⇒ PNGReader

Create a png image file reader.



156
157
158
159
160
# File 'lib/vips/reader.rb', line 156

def initialize(path, options={})
  @sequential = options[:sequential] || false

  super path, options
end

Instance Attribute Details

#sequentialObject

Returns the value of attribute sequential.



153
154
155
# File 'lib/vips/reader.rb', line 153

def sequential
  @sequential
end

Instance Method Details

#readObject



162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/vips/reader.rb', line 162

def read
  str = @path

  seq = 0
  if Vips.sequential_mode_supported?
    str << ":"
    str << "sequential" if @sequential
    seq = 1
  end

  @_im = read_internal str, seq
end