<div dir="ltr"><div>Right. it fails</div><div><br></div><div><span style="font-family:monospace">$ gdal_translate web_mercator.tif web_mercator_jpeg.tif -co COMPRESS=JPEG -co BIGTIFF=YES -of GTIFF -co TILED=YES -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -oo NUM_THREADS=ALL_CPUS</span></div><span style="font-family:monospace">Input file size is 677881, 303664<br></span><div><span style="font-family:monospace">0..                                                  - estimated remaining time: 00:31:20ERROR 1: LZWDecode:Not enough data at scanline 0 (short 2 bytes)</span></div><div><br></div><div>But if I change -oo with -co, it fails somewhere else:</div><div><br></div><div><span style="font-family:monospace">$ gdal_translate web_mercator.tif web_mercator_jpeg_co.tif -co COMPRESS=JPEG -co BIGTIFF=YES -of GTIFF -co TILED=YES -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co NUM_THREADS=ALL_CPUS<br>Input file size is 677881, 303664<br>0...10...                                            - estimated remaining time: 00:10:55ERROR 1: web_mercator.tif:Using code not yet in table<br>ERROR 1: TIFFReadEncodedTile() failed.<br>ERROR 1: web_mercator.tif, band 1: IReadBlock failed at X offset 2570, Y offset 216: TIFFReadEncodedTile() failed.</span></div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, 20 Aug 2025 at 22:43, Even Rouault <<a href="mailto:even.rouault@spatialys.com">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"><u></u>

  
    
  
  <div>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_quote">
          <div><br>
          </div>
          <div>Can I do other useful tests tonight?</div>
        </div>
      </div>
    </blockquote>
    <p>Maybe just check/confirm that the issue is multithreading on the
      decoding side (which it looks to be) with:<br>
      <br>
      gdal_translate web_mercator.tif web_mercator_jpeg.tif -co
      COMPRESS=JPEG -co BIGTIFF=YES -of GTIFF -co TILED=YES -co
      BLOCKXSIZE=512 -co BLOCKYSIZE=512 -oo NUM_THREADS=ALL_CPUS</p>
    <p>where web_mercator.tif is LZW or Deflate compressed<br>
    </p>
    <br>
    <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </div>

</blockquote></div>