// Checks if and where the image has transparency. // Such images must be currently preprocessed because ksplashx // can't do alpha blending. #include #include #include #include int main( int argc, char* argv[] ) { if( argc != 2 ) return 1; QImage im( argv[ 1 ] ); if( im.isNull()) return 2; kdDebug() << "HASALPHA:" << im.hasAlphaBuffer() << endl; for( int x = 0; x < im.width(); ++x ) for( int y = 0; y < im.height(); ++y ) { if( qAlpha( im.pixel( x, y )) != 255 ) kdDebug() << "ALPHA:" << qAlpha( im.pixel( x, y )) << ":" << QPoint( x, y ) << endl; } }