if (pBuf->bHasGAMA)
if (pBuf->bHasSRGB)                   dGamma = 0.45455; else if (pBuf->bHasGAMA)
mng_retcode init_gamma_only (mng_datap pData){  mng_float      dGamma;  mng_imagep     pImage = (mng_imagep)pData->pCurrentobj;  mng_imagedatap pBuf;#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_INIT_GAMMA_ONLY, MNG_LC_START)#endif  if (!pImage)                         /* no current object? then use object 0 */    pImage = (mng_imagep)pData->pObjzero;  pBuf = pImage->pImgbuf;              /* address the buffer */  if (pBuf->bHasGAMA)                  /* get the gamma value */    dGamma = (mng_float)pBuf->iGamma / 100000;  else  if (pData->bHasglobalGAMA)    dGamma = (mng_float)pData->iGlobalGamma / 100000;  else    dGamma = pData->dDfltimggamma;  if (dGamma)                          /* lets not divide by zero, shall we... */    dGamma = pData->dViewgamma / (dGamma * pData->dDisplaygamma);  if (dGamma != pData->dLastgamma)     /* lookup table needs to be computed ? */  {    mng_int32 iX;    pData->aGammatab [0] = 0;    for (iX = 1; iX <= 255; iX++)      pData->aGammatab [iX] = (mng_uint8)(pow (iX / 255.0, dGamma) * 255 + 0.5);    pData->dLastgamma = dGamma;        /* keep for next time */  }                                       /* load color-correction routine */  pData->fCorrectrow = (mng_ptr)correct_gamma_only;#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_INIT_GAMMA_ONLY, MNG_LC_END)#endif  return MNG_NOERROR;}