mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Better port of QVector<QRgb>
This commit is contained in:
parent
bc8372d72e
commit
d05f6710eb
@ -73,12 +73,10 @@ QImage oil_paint(const QImage &image, const float radius=-1, const bool high_qua
|
||||
sipRes = new QImage(oil_paint(*a0, a1, a2));
|
||||
IMAGEOPS_SUFFIX
|
||||
%End
|
||||
QImage quantize(const QImage &image, unsigned int maximum_colors, bool dither, SIP_PYTUPLE);
|
||||
QImage quantize(const QImage &image, unsigned int maximum_colors, bool dither, const QList<QRgb> &palette);
|
||||
%MethodCode
|
||||
QVector<QRgb> palette(PyTuple_GET_SIZE(a3));
|
||||
for (int i = 0; i < PyTuple_GET_SIZE(a3); i++) palette[i] = PyLong_AsUnsignedLong(PyTuple_GET_ITEM(a3, i));
|
||||
IMAGEOPS_PREFIX
|
||||
sipRes = new QImage(quantize(*a0, a1, a2, palette));
|
||||
sipRes = new QImage(quantize(*a0, a1, a2, *a3));
|
||||
IMAGEOPS_SUFFIX
|
||||
%End
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user