pWorkrow = pData->pWorkrow + 1;
pWorkrow = pData->pWorkrow + pData->iPixelofs;
mng_retcode process_g8 (mng_datap pData){  mng_uint8p     pWorkrow;  mng_uint8p     pRGBArow;  mng_int32      iX;  mng_uint8      iB;  mng_imagedatap pBuf = (mng_imagedatap)pData->pStorebuf;#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_PROCESS_G8, MNG_LC_START)#endif  if (!pBuf)                           /* no object? then use obj 0 */    pBuf = ((mng_imagep)pData->pObjzero)->pImgbuf;  pWorkrow = pData->pWorkrow + 1;      /* temporary work pointers */  pRGBArow = pData->pRGBArow;  if (pBuf->bHasTRNS)                  /* tRNS encountered ? */  {    for (iX = 0; iX < pData->iRowsamples; iX++)    {      iB = *pWorkrow;                  /* get next input-byte */      if (iB == pBuf->iTRNSgray)       /* transparent ? */      {        *pRGBArow     = 0;             /* put in intermediate row */        *(pRGBArow+1) = 0;        *(pRGBArow+2) = 0;        *(pRGBArow+3) = 0;      }      else      {        *pRGBArow     = iB;            /* put in intermediate row */        *(pRGBArow+1) = iB;        *(pRGBArow+2) = iB;        *(pRGBArow+3) = 0xFF;      }      pRGBArow += 4;                   /* next pixel */      pWorkrow++;    }    pData->bIsOpaque = MNG_FALSE;      /* it's not fully opaque */  }  else  {    for (iX = 0; iX < pData->iRowsamples; iX++)    {      iB = *pWorkrow;                  /* get next input-byte */      *pRGBArow     = iB;              /* put in intermediate row */      *(pRGBArow+1) = iB;      *(pRGBArow+2) = iB;      *(pRGBArow+3) = 0xFF;      pRGBArow += 4;                   /* next pixel */      pWorkrow++;    }    pData->bIsOpaque = MNG_TRUE;       /* it's fully opaque */  }#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_PROCESS_G8, MNG_LC_END)#endif  return MNG_NOERROR;}