if ( (pData->bDisplaying) && (pData->bRunning) && (!pData->bFreezing) &&
if ( (((mng_imagep)pData->pStoreobj)->iMAGN_MethodX == 0) && (((mng_imagep)pData->pStoreobj)->iMAGN_MethodY == 0) &&
mng_retcode process_display_ihdr (mng_datap pData){                                      /* address the current "object" if any */  mng_imagep pImage = (mng_imagep)pData->pCurrentobj;#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_PROCESS_DISPLAY_IHDR, MNG_LC_START)#endif  if (!pData->bHasDHDR)  {    pData->fInitrowproc = 0;           /* do nothing by default */    pData->fDisplayrow  = 0;    pData->fCorrectrow  = 0;    pData->fStorerow    = 0;    pData->fProcessrow  = 0;    pData->pStoreobj    = 0;  }  if (!pData->iBreakpoint)             /* not previously broken ? */  {    mng_retcode iRetcode = MNG_NOERROR;    if (pData->bHasDHDR)               /* is a delta-image ? */    {      if (pData->iDeltatype == MNG_DELTATYPE_REPLACE)        iRetcode = reset_object_details (pData, (mng_imagep)pData->pDeltaImage,                                         pData->iDatawidth, pData->iDataheight,                                         pData->iBitdepth, pData->iColortype,                                         pData->iCompression, pData->iFilter,                                         pData->iInterlace, MNG_TRUE);                                       /* process immediatly if bitdepth & colortype are equal */      pData->bDeltaimmediate =        (mng_bool)((pData->iBitdepth  == ((mng_imagep)pData->pDeltaImage)->pImgbuf->iBitdepth ) &&                   (pData->iColortype == ((mng_imagep)pData->pDeltaImage)->pImgbuf->iColortype)    );    }    else    {      if (pImage)                      /* update object buffer ? */        iRetcode = reset_object_details (pData, pImage,                                         pData->iDatawidth, pData->iDataheight,                                         pData->iBitdepth, pData->iColortype,                                         pData->iCompression, pData->iFilter,                                         pData->iInterlace, MNG_TRUE);      else        iRetcode = reset_object_details (pData, (mng_imagep)pData->pObjzero,                                         pData->iDatawidth, pData->iDataheight,                                         pData->iBitdepth, pData->iColortype,                                         pData->iCompression, pData->iFilter,                                         pData->iInterlace, MNG_TRUE);    }    if (iRetcode)                      /* on error bail out */      return iRetcode;  }  if (!pData->bHasDHDR)  {    if (pImage)                        /* real object ? */      pData->pStoreobj = pImage;       /* tell the row routines */    else                               /* otherwise use object 0 */      pData->pStoreobj = pData->pObjzero;                                       /* display "on-the-fly" ? */    if ( (pData->bDisplaying) && (pData->bRunning) && (!pData->bFreezing) &&         ( (pData->eImagetype == mng_it_png         ) ||           (((mng_imagep)pData->pStoreobj)->bVisible)    )                   )    {      next_layer (pData);              /* that's a new layer then ! */      if (pData->bTimerset)            /* timer break ? */        pData->iBreakpoint = 2;      else      {        pData->iBreakpoint = 0;                                       /* anything to display ? */        if ((pData->iDestr > pData->iDestl) && (pData->iDestb > pData->iDestt))          set_display_routine (pData); /* then determine display routine */      }    }  }  if (!pData->bTimerset)               /* no timer break ? */  {    switch (pData->iColortype)         /* determine row initialization routine */    {      case 0 : {                       /* gray */                 switch (pData->iBitdepth)                 {                   case  1 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_g1_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_g1_i;                               break;                             }                   case  2 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_g2_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_g2_i;                               break;                             }                   case  4 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_g4_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_g4_i;                               break;                             }                   case  8 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_g8_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_g8_i;                               break;                             }                   case 16 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_g16_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_g16_i;                               break;                             }                 }                 break;               }      case 2 : {                       /* rgb */                 switch (pData->iBitdepth)                 {                   case  8 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_rgb8_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_rgb8_i;                               break;                             }                   case 16 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_rgb16_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_rgb16_i;                               break;                             }                 }                 break;               }      case 3 : {                       /* indexed */                 switch (pData->iBitdepth)                 {                   case  1 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_idx1_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_idx1_i;                               break;                             }                   case  2 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_idx2_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_idx2_i;                               break;                             }                   case  4 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_idx4_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_idx4_i;                               break;                             }                   case  8 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_idx8_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_idx8_i;                               break;                             }                 }                 break;               }      case 4 : {                       /* gray+alpha */                 switch (pData->iBitdepth)                 {                   case  8 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_ga8_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_ga8_i;                               break;                             }                   case 16 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_ga16_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_ga16_i;                               break;                             }                 }                 break;               }      case 6 : {                       /* rgb+alpha */                 switch (pData->iBitdepth)                 {                   case  8 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_rgba8_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_rgba8_i;                               break;                             }                   case 16 : {                               if (!pData->iInterlace)                                 pData->fInitrowproc = (mng_ptr)init_rgba16_ni;                               else                                 pData->fInitrowproc = (mng_ptr)init_rgba16_i;                               break;                             }                 }                 break;               }    }  }  #ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_PROCESS_DISPLAY_IHDR, MNG_LC_END)#endif  return MNG_NOERROR;}