Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

reading tif format

reinerb
Beginner
1,429 Views
Does anybody know how to read a tif graphics file into an array using Compaq Visual Fortran so that the pixel data can be accessed?
0 Kudos
2 Replies
pcurtis
Beginner
1,429 Views
Try this link, which is a compilation of
links to implementation details for many different file formats...
http://www.wotsit.org/
0 Kudos
lcorona
Beginner
1,429 Views
I don't know how to read a tif file pixel by pixel but you could try converting it to a bitmap, then load it in fortran using LOADIMAGE, then save it from the screen to an array using GETIMAGE. But I believe the bit depth on the screen must be the same as that of the tif file.

To convert the file from tif to bmp you can download an activex control from www.sourceforge.net/projects/freeimage. You must use the Fortran Module Wizzard with "Type Library containing COM interface information" to generate the interfaces. Perhaps this control might let you read the file pixel by pixel but I'm not sure, I just use it to convert from bmp files to jpg or png.
0 Kudos
Reply