VirtualBox

Ignore:
Timestamp:
Nov 6, 2009 4:04:38 PM (15 years ago)
Author:
vboxsync
Message:

TakeScreenShotSlow convert pixels.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r24457 r24459  
    20742074    if (RT_SUCCESS(vrc))
    20752075    {
     2076        /* Convert pixels to format expected by Python: [0] R, [1] G, [2] B, [3] A. */
     2077        uint8_t *pu8 = pu8Data;
     2078        unsigned cPixels = width * height;
     2079        while (cPixels)
     2080        {
     2081            uint8_t u8 = pu8[0];
     2082            pu8[0] = pu8[2];
     2083            pu8[2] = u8;
     2084            pu8[3] = 0xff;
     2085            cPixels--;
     2086            pu8 += 4;
     2087        }
     2088
    20762089        com::SafeArray<BYTE> screenData (cbData);
    20772090        for (unsigned i = 0; i < cbData; i++)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette