Comment 23 for bug 758782

Revision history for this message
Olivier Tilloy (osomon) wrote :

Great work Paul! As I mentioned earlier, I don’t have the hardware to test, but your patch looks sane to me. I have a couple of remarks:

1) To make this architecture-dependent, enclose your kludge in the following preprocessor directives:

    #if Q_BYTE_ORDER == Q_BIG_ENDIAN
    …
    #endif

2) The logic that inverts the components of each pixel is correct, but according to the documentation, QImage::pixel(…) and QImage::setPixel(…) are expensive. The documentation recommends to use QImage::scanLine(…) instead. I’ll see if I can rewrite your code with that in mind to make it more efficient.