<div dir="ltr">Hi List,<div>I'm investigating on some GeoTIFF data being produced with GDAL 1.11.3.</div><div>Basically, when setting COMPRESS=JPEG, the generated GTIFF has the 0th IFD offset set to some KB.</div><div><br></div><div>these are the first 16 bytes of a GeoTIFF being generated like that:</div><div><div>49 49 2A 00 88 44 00 00 <b><font color="#ff0000">10</font></b> 00 00 01 03 00 01 </div></div><div><br></div><div>so:</div><div>49 49 is the endianness</div><div>00 2A is the magic number</div><div>00 00 44 88 is the offset of the 0th IFD = (17544 bytes)</div><div>Then there are several TAGs (baseline, extended and so on).</div><div>However, I think that any TIFF reader will jump to the 00 00 44 88 offset.</div><div>Moreover, the offset 00 00 00 08 (referring to the red bolded byte in my previous sample) seems not referred by any other referencing IFD.</div><div><br></div><div>So it seems like that GeoTIFF has some useless bytes right after the first 8s.</div><div><br></div><div>I have then tried to use GDAL 2.2.1 and GDAL 2.1.0 and with that version I see that the GeoTIFF being produced using same exact command is smaller and the 0th IFD offset is 8 with these recent versions.</div><div>(This information is confirmed by AsTIFFTagViewer and TiffInfo too).</div><div><br></div><div>When activating CPL_DEBUG on all versions I see this output on GDAL 1.11.3/1.11.4 whilst I don't see it on GDAL 2.x</div><div><br></div><div><i>GTiff: directory moved during flush in FlushDirectory()</i><br></div><div><i><br></i></div><div>I have quickly checked some reference in the issue tracker but I was unable to find anything, especially due to the fact that when searching for "IFD" it returns hundreds of results related to "IFDefined" :-)</div><div><br></div><div>Do you have any feedback or comment on this?</div><div>Is it related to any bug in old code or some version update? (is a different libtiff version somehow involved?)</div><div><br></div><div>Please, let me know.<br></div><div>Best Regards,</div><div>Daniele</div><div><br></div><div><br></div><div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="font-size:12.8px">==</span><br></div><div dir="ltr"><span style="font-size:12.8px">GeoServer Professional Services from the experts! Visit</span><br style="font-size:12.8px"><a href="http://goo.gl/it488V" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">http://goo.gl/it488V</a><span style="font-size:12.8px"> for more information.</span><br>
==<br>
<br>Ing. Daniele Romagnoli<br>Senior Software Engineer<br><br>GeoSolutions S.A.S.<br><span style="font-size:12.8px">Via di Montramito 3/A</span><br>55054 Massarosa (LU)<br>Italy<br>phone: +39 0584 962313<br>fax: +39 0584 1660272<br><br><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a><br><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a><br><br>-------------------------------------------------------<br><p><span lang="IT"><font size="1"><b>AVVERTENZE AI SENSI DEL D.Lgs. 196/2003</b></font></span></p><p><span lang="IT"><font size="1">Le
informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio
stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti,
copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento
contrario ai principi dettati dal D.Lgs. 196/2003.</font></span></p><p><span lang="IT"><font size="1"> </font></span></p><p><font size="1">The
information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential
or proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure,
reproduction, copying, distribution, or either dissemination, either
whole or partial, is strictly forbidden except previous formal approval
of the named addressee(s). If you are not the intended recipient, please
contact immediately the sender by telephone, fax or e-mail and delete
the information in this message that has been received in error. The
sender does not give any warranty or accept liability as the content,
accuracy or completeness of sent messages and accepts no responsibility
for changes made after they were sent or for other risks which arise as
a result of e-mail transmission, viruses, etc.</font></p><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div>