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

read, recognized?

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.


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

def initialize(path, options={})
  @sequential = false

  self.sequential = options[:sequential] if options.has_key?(:sequential)
  super path, options
end

Instance Attribute Details

#sequentialObject

Returns the value of attribute sequential.


148
149
150
# File 'lib/vips/reader.rb', line 148

def sequential
  @sequential
end

Instance Method Details

#readObject

Read the png file from disk and return a VIPS Image object.


159
160
161
162
163
164
165
# File 'lib/vips/reader.rb', line 159

def read
  str = @path
  str << ":"
  str << "sequential" if @sequential

  read_internal str
end