mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-30 15:36:02 +01:00
Better port of QVector<QRgb>
This commit is contained in:
parent
43515b7dfb
commit
09113b462c
1 changed files with 2 additions and 4 deletions
|
|
@ -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…
Reference in a new issue