pWorkrow = pData->pWorkrow + 1;
pWorkrow = pData->pWorkrow + pData->iPixelofs;
mng_retcode process_g1 (mng_datap pData){  mng_uint8p     pWorkrow;  mng_uint8p     pRGBArow;  mng_int32      iX;  mng_uint8      iB;  mng_uint8      iM;  mng_imagedatap pBuf = (mng_imagedatap)pData->pStorebuf;#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_PROCESS_G1, 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;  iM       = 0;                        /* start at pixel 0 */  iB       = 0;  if (pBuf->bHasTRNS)                  /* tRNS encountered ? */  {    if (pBuf->iTRNSgray)               /* white transparent ? */    {      for (iX = 0; iX < pData->iRowsamples; iX++)      {        if (!iM)                       /* mask underflow ? */        {          iB = *pWorkrow;              /* get next input-byte */          pWorkrow++;          iM = 0x80;        }        if (iB & iM)                   /* is it white ? */                                       /* transparent ! */          mng_put_uint32 (pRGBArow, 0x00000000);        else                           /* opaque black */          mng_put_uint32 (pRGBArow, 0x000000FF);        pRGBArow += 4;                 /* next pixel */        iM >>= 1;      }    }    else                               /* black transparent */    {      for (iX = 0; iX < pData->iRowsamples; iX++)      {        if (!iM)                       /* mask underflow ? */        {          iB = *pWorkrow;              /* get next input-byte */          pWorkrow++;          iM = 0x80;        }        if (iB & iM)                   /* is it white ? */                                       /* opaque white */          mng_put_uint32 (pRGBArow, 0xFFFFFFFF);        else                           /* transparent */          mng_put_uint32 (pRGBArow, 0x00000000);        pRGBArow += 4;                 /* next pixel */        iM >>= 1;      }    }    pData->bIsOpaque = MNG_FALSE;      /* it's not fully opaque */  }  else                                 /* no transparency */  {    for (iX = 0; iX < pData->iRowsamples; iX++)    {      if (!iM)                         /* mask underflow ? */      {        iB = *pWorkrow;                /* get next input-byte */        pWorkrow++;        iM = 0x80;      }      if (iB & iM)                     /* is it white ? */                                       /* opaque white */        mng_put_uint32 (pRGBArow, 0xFFFFFFFF);      else                             /* opaque black */        mng_put_uint32 (pRGBArow, 0x000000FF);      pRGBArow += 4;                   /* next pixel */      iM >>= 1;    }    pData->bIsOpaque = MNG_TRUE;       /* it's fully opaque */  }#ifdef MNG_SUPPORT_TRACE  MNG_TRACE (pData, MNG_FN_PROCESS_G1, MNG_LC_END)#endif  return MNG_NOERROR;}