"Ed" : <news:6sedndWoF8nreMvQnZ2dnUVZ_gydnZ2d@giganews.com> mas o menos
el s?b, 12 feb 2011 19:54:45 GMT
I am using Visual Studio C++ 6
Can anyone help me with using GDI+ to convert a tiff to a bmp?
Or other ways to do it?
Thanks
You can try FreeImage http://freeimage.sourceforge.net/download.html
download this archive FreeImage3150Win32.zip
You got some examples inside this folder FreeImage\Examples\Generic\
but BatchLoad.cpp is the most useful for you, because it shows how to
load and save images.
A TiffToBmp function could be something like this:
<code>
#include "..\FreeImage\FreeImage.h"
#include "..\FreeImage\FreeImagePlus.h"
#ifdef _DEBUG
# pragma comment ( lib, "..\\FreeImage\\FreeImaged.lib" )
# pragma comment ( lib, "..\\FreeImage\\FreeImagePlusd.lib" )
#else
# pragma comment ( lib, "..\\FreeImage\\FreeImage.lib" )
# pragma comment ( lib, "..\\FreeImage\\FreeImagePlus.lib" )
#endif
void TiffToBmp(const CString &filename)
{
FREE_IMAGE_FORMAT fif = FIF_UNKNOWN;
// try to guess the file format from the file extension
#ifdef _UNICODE
fif = FreeImage_GetFIFFromFilenameU(filename);
#else
fif = FreeImage_GetFIFFromFilename(filename));
#endif
if(fif == FIF_TARGA )