[gdal-dev] GetMetadataItem adds empty string to MetadataDomainList
Javier Jimenez Shaw
j1 at jimenezshaw.com
Thu Aug 7 11:53:23 PDT 2025
Hi
I am working in a branch to read the raw thermal data from DJI jpg images.
It is similar to FLIR, ... but different.
The branch is for now in an early stage of development. My problem is that
an existing tests are failing.
In this function I am checking the image is tagged as DJI in the EXIF:
https://github.com/jjimenezshaw/gdal/blob/dji-thermal/frmts/jpeg/jpgdataset.cpp#L405
auto make = GetMetadataItem("EXIF_Make");
bool bMakerDJI = make && STRCASECMP(make, "DJI") == 0;
if (!bMakerDJI)
return;
The problem is that the "GetMetadataItem" call is somehow writing another
entry in the GetMetadataDomainList, an empty string.
An then this test is failing:
https://github.com/jjimenezshaw/gdal/actions/runs/16811268016/job/47616930397#step:6:4277
47: E [
47: E 'IMAGE_STRUCTURE',
47: E + '',
47: E 'FLIR',
47: E 'SUBDATASETS',
47: E 'DERIVED_SUBDATASETS',
47: E ]
Is there a better way to get the EXIF "Make" tag, without polluting the
domain list? Or is there a hidden bug somewhere?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250807/1e2351fd/attachment-0001.htm>
More information about the gdal-dev
mailing list