Changeset 11121

Show
Ignore:
Timestamp:
02/26/10 09:55:50 (4 years ago)
Author:
robert
Message:

From Philip Lownman, "The libpng project decided to rename png_set_gray_1_2_4_to_8() to
png_set_expand_gray_1_2_4_to_8() with the 1.2.9 release. This
submission fixes builds of the OSG against versions of libpng < 1.2.9
that don't have the new symbol available. This affects platforms like
Red Hat Enterprise Linux 4 which come with libpng 1.2.7."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/png/ReaderWriterPNG.cpp

    r10963 r11121  
    230230                    png_set_palette_to_rgb(png); 
    231231                if (color == PNG_COLOR_TYPE_GRAY && depth < 8) 
     232                { 
     233                #if PNG_LIBPNG_VER >= 10209 
    232234                    png_set_expand_gray_1_2_4_to_8(png); 
     235                #else 
     236                    // use older now deprecated but identical call 
     237                    png_set_gray_1_2_4_to_8(png); 
     238                #endif 
     239                } 
    233240                if (png_get_valid(png, info, PNG_INFO_tRNS)) 
    234241                    png_set_tRNS_to_alpha(png);