⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.tiffile

📁 TIFF文件格式读取及生成的源代码
💻 TIFFILE
字号:
Frank,I attached a file that uses RGBA interface (tif_getimage.c) to read a tifffile 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 disadvantageis 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 towrite them.  And my files are typically small, so the overhead is mostlyinconsequential.  But for bilevel images, I overrode the get() and put()routines of the RGBA interface to just copy the data from the input rasterto the output raster, rather than expanding out to full 32 bit format.  Itwould 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 Jamesmark@james.net

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -