[Gegl-developer] A copy OP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here is a copy op and tests for float and uint8 channel types as a recursive unified context diff.

Most of the code is stolen directly from Fade but uses memcpy for fast copying.

I wrote support for uint16's but I didn't see any tests written for any operations on uint16s. I don't have time write the test right now, so I am posting what I have. In any case, the copying code is identical to the other two cases, so uint16 copying _should_ work, since the tests passed for float and uint8 types.

There was one thing I was not sure of:
Can we assume that the destination will have the same number of color channels as the source? Fade does, so my code does too, but it will segfault if this is not true.

Also, I didn't go over the testing code very well, except to make sure that it compiled, didn't have properties associated with fade, and passed the tests. I have also never written anything with GObject before, so if someone could tell me whether I did it right, I would be grateful.

--
Daniel S. Rogers



[Index of Archives]     [Yosemite News]     [Yosemite Photos]     [gtk]     [GIMP Users]     [KDE]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux