Skip to content
  • Eric Jiang's avatar
    Change vectorscope to use QImage::pixel() · 3f810507
    Eric Jiang authored and Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle committed
    Vectorscope tried to directly reinterpret the input QImage as RGB
    data, which makes an assumption that the input is RGB. On Windows, the
    input QImage is BGR, causing red and blue to be switched in the
    Vectorscope.
    
    QImage::pixel() checks QImageData->format and converts the to QRgb
    appropriately. Casual benchmarking seems to show that using pixel() is
    about 5% slower for each vectorscope calculation in the no-conversion
    case (e.g. Linux).
    
    BUG: 453149
    3f810507