I have completed my FLIR image parser component
...
I will likely release these 2 things (both the application, and the ActiveX DLL file) at the same time.
is the code open source?
Well since I finished my program before I finished the component, I'm releasing the program now. The standalone program has all the features that the component will have, except that it's compiled right into the exe file, instead of the program having the separate component as an added dependency. My next plan is to create the component, which will be an ActiveX DLL file. It should be a fairly simple process of migrating this code to a new VB6 project (the one for generating this component) now that I have all the code I want laid out in nice *.bas VB6 module files. I hope to complete the component, a single ActiveX DLL file, some time tomorrow, so you guys will be able to easily implement this functionality in your own programs, without having a bunch of module files that you would need to add to each project to get the same functionality.
Please read the readme file in the zip file, so you will know how to get the program setup to run. It's a very simple program to use. It's very self explanatory how to use each of the functions. So I haven't put a help file in the zip file.
The program, which is called FLIR FFF Viewer, is able to load all of the forms in which FLIR FFF files can exist, including ones with PNG compressed raw data, and the ones in which the FFF file is not a standalone file, but rather is embedded in a JPG file. Once loaded, there are a number of options for how to display it. It offers the ability to save the image as it is currently displayed to a BMP file. It also offers the ability to take the raw 16bits-per-pixel thermal image and save it to either an uncompressed TIF file or a losslessly compressed PNG file. Unlike with FLIR's implementation, which saves the 16bit raw data in little-endian byte order for PNG files (even though multibyte image data in PNG files is supposed to be big-endian), my implementation of 16bits PNG saving actually correctly swaps the bytes to save big-endian image data in the PNG file.
FFF files can be in one of 4 formats (all 4 of which my program will handle). FLIR calls these:
FFF
FFF+PNG
JPEG+FFF
JPEG+PNG
FFF and FFF+PNG are standalone *.FFF files. FFF stores the 16bit image data uncompressed (either in little-endian or big-endian byte order), while FFF+PNG stores the data as a losslessly compressed PNG file embedded within the FFF file (though the uncompressed image data that is input to the compressor is in the wrong byte order for PNG, thus it is technically an invalid PNG file).
JPEG+FFF and JPEG+PNG are *.JPG files with embedded *.FFF files. For the JPEG+FFF format, the embedded *.FFF file is in the pure FFF format. For the JPEG+PNG format, the embedded *.FFF file is in the FFF+PNG format.
For JPEG+FFF and JPEG+PNG, the embedded FFF file is extracted from the JPEG container prior to further processing. With the extracted (or standalone) FFF file, if it is of the FFF format, my program will directly extract the raw data. If it is in little-endian byte order this pixel array is passed directly to the rest of the program. If it is in big-endian byte order the bytes are swapped to little-endian (as needed in Windows software) before it is passed to the rest of the program. If the extracted (or standalone) FFF file is of the FFF+PNG format, my program uses ZLib (in the form of zlibwapi.dll, the stdcall version of the DLL file) to decompress the image data in the PNG file, and then passes the decompressed pixel array to the rest of my program. This is the required core functionality of any program that is to handle FLIR radiometric images.
All this functionality will also be wrapped into my ActiveX DLL component when I finish making it, allowing others to write their own programs for processing FLIR radiometric images.
Here's the download link for my program (not the DLL component). And yes, it does have all the source code.
Version 1.0
https://www.mediafire.com/?9n5m7hstbats5n9Version 1.1
https://www.mediafire.com/?o5wjeonnc390jcoVersion 1.2
https://www.mediafire.com/?zf2imwze56kqvc4