Chris,
I'm trying to replace the colors on my image using IS3ColorReplaceImage, but not happen.
My image in memory is 8 bit grayscale, but the original file is 4 bit grayscale, so the palette is 256 colors but only 16 is used.
I would like to change 15% to black and 85% to white.

<pre>
BYTE *pImage = GetImagePointer();
if(pImage==NULL) return(IS_ERR_BADPARAM);

UINT32 arrayColor[256];
memset(&arrayColor,0,sizeof(UINT32)*256);
ISrc(IS3FindColorsUsedIn8BitImage)(pImage,m_czPix. cx,m_czPix.cy,m_czPix.cx,arrayColor);

UINT32 unPixels=m_czPix.cx*m_czPix.cy;
double pBlack=0.0;

for(UINT32 i=0;i<16;i++)
{
pBlack+=((double)((double)arrayColor[i]/unPixels)*100.0);
if(pBlack>=15.0)
ISrc(IS3ColorReplaceImage)(pImage,m_czPix.cx,m_czP ix.cy,m_czPix.cx,1,i,15,0,0); //15=white
else
ISrc(IS3ColorReplaceImage)(pImage,m_czPix.cx,m_czP ix.cy,m_czPix.cx,1,i, 0,0,0); //0=black
}
</pre>