Ticket #67: rasdaman-libpng14.diff

File rasdaman-libpng14.diff, 3.6 KB (added by nospam@…, 13 years ago)

add libpng 14 support

  • conversion/png.cc

    /*
    png.cc: In member function 'virtual r_convDesc& r_Conv_PNG::convertTo(const char*)':
    png.cc:182:14: warning: 'png_struct_def::jmpbuf' is deprecated (declared at /usr/include/png.h:1114) [-Wdeprecated-declarations]
    png.cc:182:14: warning: 'png_struct_def::jmpbuf' is deprecated (declared at /usr/include/png.h:1114) [-Wdeprecated-declarations]
    png.cc:216:67: error: 'png_info' has no member named 'trans_values'
    png.cc:219:21: warning: 'png_info_struct::valid' is deprecated (declared at /usr/include/png.h:657) [-Wdeprecated-declarations]
    png.cc:219:21: warning: 'png_info_struct::valid' is deprecated (declared at /usr/include/png.h:657) [-Wdeprecated-declarations]
    png.cc:234:67: error: 'png_info' has no member named 'trans_values'
    png.cc:237:21: warning: 'png_info_struct::valid' is deprecated (declared at /usr/include/png.h:657) [-Wdeprecated-declarations]
    png.cc:237:21: warning: 'png_info_struct::valid' is deprecated (declared at /usr/include/png.h:657) [-Wdeprecated-declarations]
    png.cc:253:83: error: 'png_info' has no member named 'trans_values'
    png.cc:253:114: error: 'png_info' has no member named 'trans_values'
    png.cc:253:147: error: 'png_info' has no member named 'trans_values'
    png.cc:256:21: warning: 'png_info_struct::valid' is deprecated (declared at /usr/include/png.h:657) [-Wdeprecated-declarations]
    png.cc:256:21: warning: 'png_info_struct::valid' is deprecated (declared at /usr/include/png.h:657) [-Wdeprecated-declarations]
    png.cc:274:15: error: 'png_info' has no member named 'trans_values'
    png.cc:275:15: error: 'png_info' has no member named 'trans_values'
    png.cc:276:15: error: 'png_info' has no member named 'trans_values'
    png.cc:277:15: error: 'png_info' has no member named 'trans_values'
    png.cc: In member function 'virtual r_convDesc& r_Conv_PNG::convertFrom(const char*)':
    png.cc:433:14: warning: 'png_struct_def::jmpbuf' is deprecated (declared at /usr/include/png.h:1114) [-Wdeprecated-declarations]
    png.cc:433:14: warning: 'png_struct_def::jmpbuf' is deprecated (declared at /usr/include/png.h:1114) [-Wdeprecated-declarations]
    */
    old new  
    214214      if (transpFound)
    215215      {
    216         itemsScanned = sscanf( trans_string, " %hi ", &(info_ptr->trans_values.gray) );
     216        itemsScanned = sscanf( trans_string, " %hi ", &(info_ptr->trans_color.gray) );
    217217        if (itemsScanned == 1)                  // all required items found?
    218218        {
     
    232232      if (transpFound)
    233233      {
    234         itemsScanned = sscanf( trans_string, " %hi ", &(info_ptr->trans_values.gray) );
     234        itemsScanned = sscanf( trans_string, " %hi ", &(info_ptr->trans_color.gray) );
    235235        if (itemsScanned == 1)                  // all required items found?
    236236        {
     
    251251      if (transpFound)
    252252      {
    253         itemsScanned = sscanf( trans_string, " ( %hi ; %hi ; %hi ) ", &(info_ptr->trans_values.red), &(info_ptr->trans_values.green), &(info_ptr->trans_values.blue) );
     253        itemsScanned = sscanf( trans_string, " ( %hi ; %hi ; %hi ) ", &(info_ptr->trans_color.red), &(info_ptr->trans_color.green), &(info_ptr->trans_color.blue) );
    254254        if (itemsScanned == 3)                  // all required items found?
    255255        {
     
    272272  if (bps == 8)
    273273  {
    274     info_ptr->trans_values.red   &= 0xff;
    275     info_ptr->trans_values.green &= 0xff;
    276     info_ptr->trans_values.blue  &= 0xff;
    277     info_ptr->trans_values.gray  &= 0xff;
     274    info_ptr->trans_color.red   &= 0xff;
     275    info_ptr->trans_color.green &= 0xff;
     276    info_ptr->trans_color.blue  &= 0xff;
     277    info_ptr->trans_color.gray  &= 0xff;
    278278  }
    279279