Convert TIFF to bmp
-
Hi all, I need to convert tiff file to bmp file. I found libtiff library. Maybe anybody using this library? If it possable, give me some ideas how to do that? (TIFF encoded to CMYK)
the easiest way to use LibTiff is with its RGBA interface: it goes something like this:
TIFF *tif = TIFFOpen(...)
UINT32 width, height;
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &height);if (TIFFRGBAImageOK(tif, msg)==0)
{
BYTE * pBuffer = new BYTE[w * h * 4];TIFFReadRGBAImage(tif, width, height, pBuffer, 1);
... etc
}TIFFClose(tif)
and then you will have an RGBA image from your TIFF file... but, there are plenty of libraries out there that can do all of for you.
-
Hi all, I need to convert tiff file to bmp file. I found libtiff library. Maybe anybody using this library? If it possable, give me some ideas how to do that? (TIFF encoded to CMYK)
Doesn't GDI+ do this for you ?
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
the easiest way to use LibTiff is with its RGBA interface: it goes something like this:
TIFF *tif = TIFFOpen(...)
UINT32 width, height;
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &height);if (TIFFRGBAImageOK(tif, msg)==0)
{
BYTE * pBuffer = new BYTE[w * h * 4];TIFFReadRGBAImage(tif, width, height, pBuffer, 1);
... etc
}TIFFClose(tif)
and then you will have an RGBA image from your TIFF file... but, there are plenty of libraries out there that can do all of for you.
-
Many thanks :), I'll try it.
but, there are plenty of libraries out there that can do all of for you.
I need it for my cross-platform application, which uses wxWidgets library.
-
Many thanks :), I'll try it.
but, there are plenty of libraries out there that can do all of for you.
I need it for my cross-platform application, which uses wxWidgets library.