diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-27 02:13:42 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-27 02:13:42 -0600 |
commit | 520c05ef06ce203ad32470730f68402bc7719157 (patch) | |
tree | 8d0bb18bbbecb4c837e232848905e5819db84b81 /src/kernel/qpngio.cpp | |
parent | b82553bf90cb5311cfe8e673b07cf6cffc95fd3c (diff) | |
download | tqt3-520c05ef06ce203ad32470730f68402bc7719157.tar.gz tqt3-520c05ef06ce203ad32470730f68402bc7719157.zip |
Automated update from qt3
Diffstat (limited to 'src/kernel/qpngio.cpp')
-rw-r--r-- | src/kernel/qpngio.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/kernel/qpngio.cpp b/src/kernel/qpngio.cpp index c4a5c9979..2d12ec985 100644 --- a/src/kernel/qpngio.cpp +++ b/src/kernel/qpngio.cpp @@ -156,8 +156,8 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc png_read_update_info( png_ptr, info_ptr ); if (!image.create( width, height, 1, 2, TQImage::BigEndian )) return; - image.setColor( 1, qRgb(0,0,0) ); - image.setColor( 0, qRgb(255,255,255) ); + image.setColor( 1, tqRgb(0,0,0) ); + image.setColor( 0, tqRgb(255,255,255) ); } else if (bit_depth == 16 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { png_set_expand(png_ptr); png_set_strip_16(png_ptr); @@ -182,7 +182,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc return; for (int i=0; i<ncols; i++) { int c = i*255/(ncols-1); - image.setColor( i, qRgba(c,c,c,0xff) ); + image.setColor( i, tqRgba(c,c,c,0xff) ); } if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) { #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 ) @@ -194,7 +194,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc #endif if (g < ncols) { image.setAlphaBuffer(TRUE); - image.setColor(g, image.color(g) & RGB_MASK); + image.setColor(g, image.color(g) & TQT_RGB_MASK); } } } @@ -225,13 +225,13 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 ) while ( i < info_ptr_num_trans ) { - image.setColor(i, qRgba( + image.setColor(i, tqRgba( info_ptr_palette[i].red, info_ptr_palette[i].green, info_ptr_palette[i].blue, #else /* LIBPNG 1.5 */ while ( i < info_ptr->num_trans ) { - image.setColor(i, qRgba( + image.setColor(i, tqRgba( info_ptr->palette[i].red, info_ptr->palette[i].green, info_ptr->palette[i].blue, @@ -250,13 +250,13 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc } #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 ) while ( i < info_ptr_num_palette ) { - image.setColor(i, qRgba( + image.setColor(i, tqRgba( info_ptr_palette[i].red, info_ptr_palette[i].green, info_ptr_palette[i].blue, #else /* LIBPNG 1.5 */ while ( i < info_ptr->num_palette ) { - image.setColor(i, qRgba( + image.setColor(i, tqRgba( info_ptr->palette[i].red, info_ptr->palette[i].green, info_ptr->palette[i].blue, @@ -387,7 +387,7 @@ void read_png_image(TQImageIO* iio) #if 0 // libpng takes care of this. png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) if (image.depth()==32 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { - TQRgb trans = 0xFF000000 | qRgb( + TQRgb trans = 0xFF000000 | tqRgb( #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 ) (info_ptr->trans_color.red << 8 >> bit_depth)&0xff, (info_ptr->trans_color.green << 8 >> bit_depth)&0xff, @@ -435,7 +435,7 @@ png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) c = image.colorTable(); n = image.numColors(); } - while ( n-- && qAlpha(*c++)==0xff ) + while ( n-- && tqAlpha(*c++)==0xff ) ; if ( n<0 ) // LIAR! image.setAlphaBuffer(FALSE); @@ -622,13 +622,13 @@ should be able to comment this out. for (int i=0; i<num_palette; i++) { TQRgb rgb=image.color(i); #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 ) - info_ptr_palette[i].red = qRed(rgb); - info_ptr_palette[i].green = qGreen(rgb); - info_ptr_palette[i].blue = qBlue(rgb); + info_ptr_palette[i].red = tqRed(rgb); + info_ptr_palette[i].green = tqGreen(rgb); + info_ptr_palette[i].blue = tqBlue(rgb); #else /* LIBPNG 1.5 */ - info_ptr->palette[i].red = qRed(rgb); - info_ptr->palette[i].green = qGreen(rgb); - info_ptr->palette[i].blue = qBlue(rgb); + info_ptr->palette[i].red = tqRed(rgb); + info_ptr->palette[i].green = tqGreen(rgb); + info_ptr->palette[i].blue = tqBlue(rgb); #endif /* LIBPNG 1.5 */ if (image.hasAlphaBuffer()) { trans[i] = rgb >> 24; @@ -907,7 +907,7 @@ bool TQPNGImagePacker::packImage(const TQImage& img) if ( i == alignx ) { // All the same for (i=0; i<alignx; i++) { - ld[x+i] = qRgba(0,0,0,0); + ld[x+i] = tqRgba(0,0,0,0); } } else { // Some different @@ -921,7 +921,7 @@ bool TQPNGImagePacker::packImage(const TQImage& img) if ( li[x] != lp[x] ) ld[x] = 0xff000000 | li[x]; else - ld[x] = qRgba(0,0,0,0); + ld[x] = tqRgba(0,0,0,0); } } } |