Method: Ray::Image#write

Defined in:
ext/image.c

#write(filename) ⇒ Object

Saves the image in any format supported by Ray

This will try to guess the format based on the filename extension (regardless of the case). If Ray can’t guess the filename, the image will be saved anyway using TGA.



130
131
132
133
134
135
136
137
# File 'ext/image.c', line 130

static
VALUE ray_image_write(VALUE self, VALUE filename) {
  if (!say_image_write(ray_rb2image(self), StringValuePtr(filename))) {
    rb_raise(rb_eRuntimeError, "%s", say_error_get_last());
  }

  return self;
}