<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Javier,</p>
    <p>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<br>
      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.</p>
    <p>Even</p>
    <div class="moz-cite-prefix">Le 02/02/2026 à 18:39, Javier Jimenez
      Shaw a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CADRrdKtOOGTNc3Utio7rPnYbv1O-R5Y2Ee5kovn87FE2ABUJLw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hi Even</div>
        <div><br>
        </div>
        <div>I was not able to achieve that, sorry. So finally I made
          the PR with an original image.</div>
        <div>If anybody has one image that works I can still replace
          mine.</div>
        <div><br>
        </div>
        <div>Thanks</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Sat, 31 Jan 2026 at 03:20,
          Even Rouault <<a href="mailto:even.rouault@spatialys.com"
            target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">even.rouault@spatialys.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <p>Javier,</p>
            <p>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 :-) ?</p>
            <p>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
              <a
href="https://github.com/OSGeo/gdal/blob/master/autotest/gdrivers/data/grib/rotated_pole.grb2.xml"
                target="_blank" moz-do-not-send="true"
                class="moz-txt-link-freetext">https://github.com/OSGeo/gdal/blob/master/autotest/gdrivers/data/grib/rotated_pole.grb2.xml</a> 
               and then you use "/vsisparse/your.xml" as a valid JPEG
              dataset name.</p>
            <p>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.</p>
            <p>Even</p>
            <div>Le 30/01/2026 à 10:43, Javier Jimenez Shaw via gdal-dev
              a écrit :<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div>Hi</div>
                <div><br>
                </div>
                <div>TL;DR: I need a "small" FLIR image file for a unit
                  test in GDAL. Do you have one?</div>
                <div><br>
                </div>
                <div>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.</div>
                <div><br>
                </div>
                <div>I want to add a unit test with a real image, but
                  unfortunately I only have "big" images, around 4 or 5
                  MB.</div>
                <div><br>
                </div>
                <div>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).</div>
                <div>The model "FLIR T640" I think produces images of
                  about 1.5 MB only. But it can be other models as well.</div>
                <div><br>
                </div>
                <div>To check if it has the Embedded Image, just run
                  this:</div>
                <div><br>
                </div>
                <div><span style="font-family:monospace">exiftool
                    -EmbeddedImage filename.jpg</span></div>
                <div><br>
                </div>
                <div>If you see any output, please contact me.</div>
                <div><br>
                </div>
                <div>Thank you!</div>
              </div>
              <br>
              <fieldset></fieldset>
              <pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank"
              moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev"
              target="_blank" moz-do-not-send="true"
              class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
            </blockquote>
            <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank"
            moz-do-not-send="true" class="moz-txt-link-freetext">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>