libtiff/contrib/win_dib
Vadim Zeitlin 193c1c7394 Create tag for v4.2.0
-----BEGIN PGP SIGNATURE-----
 
 iHUEABEIAB0WIQTr39shsCDuj9FRqI3jAQR94RmJdQUCX95KfAAKCRDjAQR94RmJ
 ddHsAP9aNuHBYnueUqBjE34GjNwgwh8rt01MrUT6qYLBomlClgD+L3Xed/AbZH6k
 k3RLq2Wyd7YPMyi6/I9FbIw5av98Dis=
 =RqwF
 -----END PGP SIGNATURE-----

Merge tag 'v4.2.0' into wx

Update to the latest upstream release and rerun autogen.sh.
2020-12-30 17:56:13 +01:00
..
CMakeLists.txt * CMakeLists.txt: Add CMake patchset by Roger Leigh as posted to 2015-06-25 02:27:58 +00:00
Makefile.am All the CMakeLists.txt files were missing from the distribution tarball. 2015-08-30 21:26:45 +00:00
Makefile.in Create tag for v4.2.0 2020-12-30 17:56:13 +01:00
Makefile.w95 Remove all $Id and $Headers comments with CVS versions 2017-11-30 18:02:46 +01:00
README.tiff2dib Fix some typos 2018-02-24 21:47:52 +01:00
README.Tiffile New 2002-06-12 03:30:24 +00:00
tiff2dib.c contrib/win_dib/tiff2dib: fix Uninitialized variable: lpBits 2020-03-09 09:08:07 +01:00
Tiffile.cpp Fix some typos 2018-02-24 21:47:52 +01:00

Frank,

I attached a file that uses RGBA interface (tif_getimage.c) to read a tiff
file and convert to a DIB.  It's advantage is that it is easy to read *any*
tiff file suported by libtiff and easily convert it to a DIB.  The disadvantage
is that bilevel (B&W) bitmaps (and all other non-rgba images) are also 
converted to RGBA, thus taking up 32x as much memory as needed (4 bytes per 
pixel, rather than 1 bit).  I read tiff files, but don't need to
write them.  And my files are typically small, so the overhead is mostly
inconsequential.  But for bilevel images, I overrode the get() and put()
routines of the RGBA interface to just copy the data from the input raster
to the output raster, rather than expanding out to full 32 bit format.  It
would be nice if there were a simple way to handle all palletized images,
but that would take more custom routines, and it's not that important to me.

Usage:

    m_pDIB = (PBITMAPINFOHEADER)::ReadTIFF(pathName);
    if (m_pDIB != 0) {
       m_format = IMAGETYPE_TIF;
    }

This is intended as Win32, but the modifications for new get() and put()
routines may be independent of platform.

Thanks for your work supporting the forum and the library!

Regards,

Mark James
mark@james.net