You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: should be char not int? we are then copying 1 byte
491
493
int red = 0;
492
494
int green = 0;
493
495
int blue = 0;
494
496
int alpha = 255;
495
497
for ( int i = 0; i < nPixels; ++i )
496
498
{
497
499
QRgb c( *p++ );
498
-
red = qRed( c ); green = qGreen( c ); blue = qBlue( c ); alpha = qAlpha( c );
500
+
alpha = qAlpha( c );
501
+
red = qRed( c ); green = qGreen( c ); blue = qBlue( c );
502
+
503
+
if ( inputDataType == QgsRasterInterface::ARGB32_Premultiplied )
504
+
{
505
+
double a = alpha / 255.;
506
+
QgsDebugMsg( QString( "red = %1 green = %2 blue = %3 alpha = %4 p = %5 a = %6" ).arg( red ).arg( green ).arg( blue ).arg( alpha ).arg(( int )*p, 0, 16 ).arg( a ) );
0 commit comments