Reverse Engineering the .IRG infrared thermal imaging format - help needed
I always find it depressing when I reach the limits of my abilities.
I have a new Thermal Imaging camera. It automatically saves photos in two formats. The first is a standard JPEG with false colours and metadata superimposed.

The second is a .irg
file which can only be opened by the Windows-only software which comes with the camera.
Judging from what that software shows, the .irg
contains a raw thermal image and separate metadata. That makes it more useful for analysis.

What I know (not much!)
Here's what I can find out about this undocumented file format.
Every .irg
file is exactly 131,080 bytes. I presume that means the image is stored as an uncompressed array of pixels - the thermal sensor is only 256x192. And I also guess that it has fixed length fields for metadata?
Each file has a different MD5 hash - so these are unique.
I couldn't identify the images with the standard Linux tools of identify
, strings
, file
, or exiftool
. Thermal Imaging tools like ThermImageJ weren't able to read them.
Running binwalk
showed that there was a JPEG at 0x1FAC0
until the end of the file. Each .irg
had exactly the same JPEG attached:

An unexciting, 180x240, 1,352 byte, lump of green. There's no exif in it.
A hexdump
shows that all the .irg
files start with the same header:
0000000 0bb0 0080 a8c0 0000 00f0 00b4 c000 00a8
0000010 f000 b400 0000 a8c0 0000 00f0 00b4 251c
0000020 0000 7e7c 002d 7e7c 002d 1388 0000 0fa0
0000030 0000 2710 0000 0000 0000 2710 0000 0000
0000040 0000 0000 0000 0004 0000 0002 0000 0000
0000050 0000 0000 0000 0000 0000 0000 0000 0000
That doesn't look like any file signature I recognise.
The metadata on the software's PDF manual showed it was written by Infiray. They don't have any details on their site and haven't responded to my emails.
My knowledge of comparing hexdumps and trying to interpret them is lacking. It looks to me like there is a bunch of regular data in there, but I wasn't able to make head nor tale of it.
There are some articles about decoding these sorts of files but I wasn't able to apply that knowledge.
Your turn
Well gang, I'm stumped! Here is a zip with 5 JPEGs and their corresponding 5 .irg
files.
If you can decipher how they work, or get me any closer to an open source viewer, please let me know!
Progress
James has a quick scrap of Python to extract the black and white image.
I think that's just from the visual sensor, rather than the thermal sensor - but it's a start!
Further Update!
nicopap says:
nicopap says:
Yo says:
Craig says:
More comments on Mastodon.