Beispiel #1
0
/*
  call-seq: screenshot(pic)

  Takes a screenshot.
*/
VALUE Graphics_screenshot(VALUE self, VALUE pic)
{
    char *filename = StringValuePtr(pic);

    oslWriteImageFile(OSL_SECONDARY_BUFFER, filename, 0);
    return Qnil;
}
Beispiel #2
0
static PyObject* image_write(PyImage *self,
                             PyObject *args,
                             PyObject *kwargs)
{
    char *filename;
    int flags = 0;

    if (!PyArg_ParseTuple(args, "s|i:write", &filename, &flags))
       return NULL;

    oslWriteImageFile(self->pImg, filename, flags);

    Py_INCREF(Py_None);
    return Py_None;
}