diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
commit | 10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch) | |
tree | 4bc444c00a79e88105f2cfce5b6209994c413ca0 /kimgio/tga.cpp | |
parent | 307136d8eef0ba133b78ceee8e901138d4c996a1 (diff) | |
download | tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip |
Revert automated changes
Sorry guys, they are just not ready for prime time
Work will continue as always
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kimgio/tga.cpp')
-rw-r--r-- | kimgio/tga.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kimgio/tga.cpp b/kimgio/tga.cpp index c68dc6a0c..8fb5fbd7f 100644 --- a/kimgio/tga.cpp +++ b/kimgio/tga.cpp @@ -27,9 +27,9 @@ #include <kdebug.h> -typedef TQ_UINT32 uint; -typedef TQ_UINT16 ushort; -typedef TQ_UINT8 uchar; +typedef Q_UINT32 uint; +typedef Q_UINT16 ushort; +typedef Q_UINT8 uchar; namespace { // Private. @@ -268,13 +268,13 @@ namespace { // Private. // Paletted. for( int x = 0; x < tga.width; x++ ) { uchar idx = *src++; - scanline[x] = tqRgb( palette[3*idx+2], palette[3*idx+1], palette[3*idx+0] ); + scanline[x] = qRgb( palette[3*idx+2], palette[3*idx+1], palette[3*idx+0] ); } } else if( info.grey ) { // Greyscale. for( int x = 0; x < tga.width; x++ ) { - scanline[x] = tqRgb( *src, *src, *src ); + scanline[x] = qRgb( *src, *src, *src ); src++; } } @@ -283,13 +283,13 @@ namespace { // Private. if( tga.pixel_size == 16 ) { for( int x = 0; x < tga.width; x++ ) { Color555 c = *reinterpret_cast<Color555 *>(src); - scanline[x] = tqRgb( (c.r << 3) | (c.r >> 2), (c.g << 3) | (c.g >> 2), (c.b << 3) | (c.b >> 2) ); + scanline[x] = qRgb( (c.r << 3) | (c.r >> 2), (c.g << 3) | (c.g >> 2), (c.b << 3) | (c.b >> 2) ); src += 2; } } else if( tga.pixel_size == 24 ) { for( int x = 0; x < tga.width; x++ ) { - scanline[x] = tqRgb( src[2], src[1], src[0] ); + scanline[x] = qRgb( src[2], src[1], src[0] ); src += 3; } } @@ -297,7 +297,7 @@ namespace { // Private. for( int x = 0; x < tga.width; x++ ) { // ### TODO: verify with images having really some alpha data const uchar alpha = ( src[3] << ( 8 - numAlphaBits ) ); - scanline[x] = tqRgba( src[2], src[1], src[0], alpha ); + scanline[x] = qRgba( src[2], src[1], src[0], alpha ); src += 4; } } @@ -370,19 +370,19 @@ KDE_EXPORT void kimgio_tga_write( TQImageIO *io ) s << targaMagic[i]; // write header - s << TQ_UINT16( img.width() ); // width - s << TQ_UINT16( img.height() ); // height - s << TQ_UINT8( hasAlpha ? 32 : 24 ); // depth (24 bit RGB + 8 bit alpha) - s << TQ_UINT8( hasAlpha ? 0x24 : 0x20 ); // top left image (0x20) + 8 bit alpha (0x4) + s << Q_UINT16( img.width() ); // width + s << Q_UINT16( img.height() ); // height + s << Q_UINT8( hasAlpha ? 32 : 24 ); // depth (24 bit RGB + 8 bit alpha) + s << Q_UINT8( hasAlpha ? 0x24 : 0x20 ); // top left image (0x20) + 8 bit alpha (0x4) for( int y = 0; y < img.height(); y++ ) for( int x = 0; x < img.width(); x++ ) { const QRgb color = img.pixel( x, y ); - s << TQ_UINT8( tqBlue( color ) ); - s << TQ_UINT8( tqGreen( color ) ); - s << TQ_UINT8( tqRed( color ) ); + s << Q_UINT8( qBlue( color ) ); + s << Q_UINT8( qGreen( color ) ); + s << Q_UINT8( qRed( color ) ); if( hasAlpha ) - s << TQ_UINT8( tqAlpha( color ) ); + s << Q_UINT8( qAlpha( color ) ); } io->setStatus( 0 ); |