- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I have installed the LibTIFF freeware and can use it to read TIFF images and write bitmap files (I'm using some C code I found on the Web for this). But what I really want to be able to do is read the TIFF images directly into memory bitmaps for immediate display, etc. The core of the C code I have is:
outbuf[j * 3] = TIFFGetB(buf);
outbuf[j * 3 + 1] = TIFFGetG(buf);
outbuf[j * 3 + 2] = TIFFGetR(buf);
}
fwrite(outbuf, 1, scansize, bmp);
which I will ultimately render into Fortran. But how do I write the image to a memory bitmap using these TIFFGetB, etc, functions?This doesn't seem to be a case for using a memory device context and drawing to that. I have seen hints and clues in examples using SetBitmapBits and SetDIBits, but they're all in C, which I really don't understand very well. What I really need is some advice on what is the right approach to take and perhaps a Fortran example. Can anybody help?
With many thanks in advance,
Mike
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have not translated image data to BMP from another format, but I think the Windows mechanism for this requires you to create a memory DC, then create a bitmap within that DC (in the same size as your original image), and then use the SETPIXEL function in a loop to translate your data one point at a time.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page