I want to extract images from a CImageList and save them as transparent GIF files. I'm using the following GDI+ code and the transparent area comes out black.
const HICON hIcon = myImageList.ExtractIcon( nImage );
Bitmap* gdiBMP = Bitmap::FromHICON( hIcon );
CLSID encoderClsid;
GetEncoderClsid( T2W( "image/gif" ), &encoderClsid );
Status stat = gdiBMP->Save( L"myfilename.gif", &encoderClsid, NULL );
delete gdiBMP;
I'm assuming I need to explicitly set the transparent image in the gif file. Or muck with the Bitmap. I have found some .Net articles related to this, but for this specific project I'm using VC6.
Have Google'd to no avail. Any/all suggestions most welcome.
Neville Franks, www.surfulater.com