GMIC in Krita
Lukast dev
lukast.dev at gmail.com
Sun Apr 14 18:51:49 UTC 2013
> Ah! Now I get you. But that is already provided for, too, by:
>
> /**
> * Copy the bytes in the paint device into a vector of arrays of bytes,
> * where the number of arrays is the number of channels in the
> * paint device. If the specified area is larger than the paint
> * device's extent, the default pixel will be read.
> */
> QVector<quint8*> readPlanarBytes(qint32 x, qint32 y, qint32 w, qint32
> h);
>
> /**
> * Write the data in the separate arrays to the channes. If there
> * are less vectors than channels, the remaining channels will not
> * be copied. If any of the arrays points to 0, the channel in
> * that location will not be touched. If the specified area is
> * larger than the paint device, the paint device will be
> * extended. There are no guards: if the area covers more pixels
> * than there are bytes in the arrays, krita will happily fill
> * your paint device with areas of memory you never wanted to be
> * read. Krita may also crash.
> *
> * XXX: what about undo?
> */
> void writePlanarBytes(QVector<quint8*> planes, qint32 x, qint32 y,
> qint32 w, qint32 h);
>
>
> Not absolutely completely efficient, of course, but this is the right thing
> to do.
Cool, something like this could work. I would test it immediatelly but I
got crash when I was converting RGB8 to RGBA Float32 colorspace, so I
need to investigate
that problem first.
More information about the kimageshop
mailing list