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.



87
88
89
90
91
92
93
# File 'lib/vips/writer.rb', line 87

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.



83
84
85
# File 'lib/vips/writer.rb', line 83

def format
  @format
end

Instance Method Details

#write(path) ⇒ Object



95
96
97
# File 'lib/vips/writer.rb', line 95

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