[gdal-dev] FLIR thermal with embedded image
Even Rouault
even.rouault at spatialys.com
Mon Feb 2 10:02:53 PST 2026
Javier,
I've just added a commit in your pull request to replace your image with
a smaller one. I've started from autotest/gdrivers/data/jpeg/flir/FLIR.jpg
and then hacked record 2 of type 32 (FLIR_REC_CAMERA_INFO) with data at
offset 0xC7E + 1352 by replacing it by type 14 (FLIR_REC_EMBEDDEDIMAGE),
and then I copied & pasted the content of a 2x1 JPEG image at offset
0xC7E + 1352 + 32. This resulting image is of course non sensical, but
enough for our purposes.
Even
Le 02/02/2026 à 18:39, Javier Jimenez Shaw a écrit :
> Hi Even
>
> I was not able to achieve that, sorry. So finally I made the PR with
> an original image.
> If anybody has one image that works I can still replace mine.
>
> Thanks
>
> On Sat, 31 Jan 2026 at 03:20, Even Rouault
> <even.rouault at spatialys.com> wrote:
>
> Javier,
>
> What about the hard core GDAL contributor way of starting with a
> small JPEG image and then adding the needed bytes with your
> favorite hexadecimal editor :-) ?
>
> Otherwise, still a bit of use of your hexadecimal editor, but just
> to find out a couple offfset/lenghts, you may try the trick of
> starting from an existing file, keeping the begin in a part, the
> end in the other part, and omitting most of the embedded image
> using a /vsisparse/ .XML file and replacing it with a
> <ConstantRegion> at zero. Like
> https://github.com/OSGeo/gdal/blob/master/autotest/gdrivers/data/grib/rotated_pole.grb2.xml
> and then you use "/vsisparse/your.xml" as a valid JPEG dataset name.
>
> Or variation of the above, perhaps a bit less convoluted, start
> with your initial image, set to the zero byte unneeded ranges, and
> zip it.
>
> Even
>
> Le 30/01/2026 à 10:43, Javier Jimenez Shaw via gdal-dev a écrit :
>> Hi
>>
>> TL;DR: I need a "small" FLIR image file for a unit test in GDAL.
>> Do you have one?
>>
>> I am working on GDAL's thermal jpeg code, to read an embedded RGB
>> image that some FLIR cameras are including inside the JPEG, in
>> addition to the thermal information/image.
>>
>> I want to add a unit test with a real image, but unfortunately I
>> only have "big" images, around 4 or 5 MB.
>>
>> It would be great if anybody has a smaller image that can be
>> included in the GDAL tests code (with the copyright/license
>> permissions that it has).
>> The model "FLIR T640" I think produces images of about 1.5 MB
>> only. But it can be other models as well.
>>
>> To check if it has the Embedded Image, just run this:
>>
>> exiftool -EmbeddedImage filename.jpg
>>
>> If you see any output, please contact me.
>>
>> Thank you!
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> --
> http://www.spatialys.com
> My software is free, but my time generally not.
>
--
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20260202/566ce9f6/attachment.htm>
More information about the gdal-dev
mailing list