On Github brijshah / COMP7615A1
brij shah / callum styan
objective:
problem:
static PyObject* _convert(ImagingObject* self, PyObject* args) { char* mode; int dither = 0; ImagingObject *paletteimage = NULL; if (!PyArg_ParseTuple(args, "s|iO", &mode, &dither, &paletteimage)) return NULL; if (paletteimage != NULL) { if (!PyImaging_Check(paletteimage)) { PyObject_Print((PyObject *)paletteimage, stderr, 0); PyErr_SetString(PyExc_ValueError, "palette argument must be image with mode 'P'"); return NULL; } if (paletteimage->image->palette == NULL) { PyErr_SetString(PyExc_ValueError, "null palette"); return NULL; } } return PyImagingNew(ImagingConvert(self->image, mode, paletteimage ? paletteimage->image->palette : NULL, dither)); }
put some text here???
put some text here???
put text here swagins