GMIC in Krita

Lukast dev lukast.dev at gmail.com
Sun Apr 14 10:36:00 UTC 2013


>> So my approach will be:
>> a) convert layer actual color-space to FLOAT32 RGB(A), relayout pixel
>> format (Krita uses bgrbgrbgrbgr, GMIC rrrrbbbbgggg)
>
>
> Hm, I don't think so. Specially for float32 I created KoRgbF32Traits --
> this means that the f32 and f16 colorspaces layout the pixel as rgba:
>
>    addChannel(new KoChannelInfo(i18n("Red")  , 0 * sizeof(float), 0,
> KoChannelInfo::COLOR, KoChannelInfo::FLOAT32, 4, QColor(255, 0, 0)));
>     addChannel(new KoChannelInfo(i18n("Green"), 1 * sizeof(float), 1,
> KoChannelInfo::COLOR, KoChannelInfo::FLOAT32, 4, QColor(0, 255, 0)));
>     addChannel(new KoChannelInfo(i18n("Blue") , 2 * sizeof(float), 2,
> KoChannelInfo::COLOR, KoChannelInfo::FLOAT32, 4, QColor(0, 0, 255)));
>     addChannel(new KoChannelInfo(i18n("Alpha"), 3 * sizeof(float), 3,
> KoChannelInfo::ALPHA, KoChannelInfo::FLOAT32, 4));
>
> So not much conversion needed, I think

Well, it still layout pixels in 2x2 image like this:

rgbargbargbargba

but GMIC asks for

rrrrggggbbbbaaaa

Lukas


More information about the kimageshop mailing list