|
|
@ -88,7 +88,7 @@ bool PNGLoader::load(const TQString& filePath, DImgLoaderObserver *observer)
|
|
|
|
unsigned char buf[PNG_BYTES_TO_CHECK];
|
|
|
|
unsigned char buf[PNG_BYTES_TO_CHECK];
|
|
|
|
|
|
|
|
|
|
|
|
fread(buf, 1, PNG_BYTES_TO_CHECK, f);
|
|
|
|
fread(buf, 1, PNG_BYTES_TO_CHECK, f);
|
|
|
|
if (!png_check_sig(buf, PNG_BYTES_TO_CHECK))
|
|
|
|
if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DDebug() << k_funcinfo << "Not a PNG image file." << endl;
|
|
|
|
DDebug() << k_funcinfo << "Not a PNG image file." << endl;
|
|
|
|
fclose(f);
|
|
|
|
fclose(f);
|
|
|
@ -252,7 +252,7 @@ bool PNGLoader::load(const TQString& filePath, DImgLoaderObserver *observer)
|
|
|
|
#ifdef ENABLE_DEBUG_MESSAGES
|
|
|
|
#ifdef ENABLE_DEBUG_MESSAGES
|
|
|
|
DDebug() << "PNG in PNG_COLOR_TYPE_GRAY" << endl;
|
|
|
|
DDebug() << "PNG in PNG_COLOR_TYPE_GRAY" << endl;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
png_set_gray_1_2_4_to_8(png_ptr);
|
|
|
|
png_set_expand_gray_1_2_4_to_8(png_ptr);
|
|
|
|
png_set_gray_to_rgb(png_ptr);
|
|
|
|
png_set_gray_to_rgb(png_ptr);
|
|
|
|
|
|
|
|
|
|
|
|
if (TQImage::systemByteOrder() == TQImage::LittleEndian) // Intel
|
|
|
|
if (TQImage::systemByteOrder() == TQImage::LittleEndian) // Intel
|
|
|
|