Class: VIPS::PPMWriter

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

Constant Summary collapse

FORMAT =
[:binary, :ascii]

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Writer

#exif=, #icc=, #image, #remove_exif, #remove_icc

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(image, options = {}) ⇒ PPMWriter

Returns a new instance of PPMWriter.



110
111
112
113
114
115
116
# File 'lib/vips/writer.rb', line 110

def initialize(image, options={})
  super image

  @format = :binary

  self.format = options[:format] if options.has_key?(:format)
end

Instance Attribute Details

#formatObject

Returns the value of attribute format.



106
107
108
# File 'lib/vips/writer.rb', line 106

def format
  @format
end

Instance Method Details

#write(path) ⇒ Object



118
119
120
# File 'lib/vips/writer.rb', line 118

def write(path)
  write_gc "#{path}:#{@format}"
end