<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<blockquote type="cite"
cite="mid:CAHEdGZMQLNDekbz5qQ64oifw8vW2ZhUVrkRty6VHq3Uc-dgfKg@mail.gmail.com">
<div dir="ltr">
<div><br>
But I need another piece of advice.<br>
Using alpha transparency, with the 4 bands, I cannot use
PHOTOMETRIC=YCBCR, and I used PHOTOMETRIC=RGB.</div>
<div>This way the compression is a little less effective.<br>
</div>
<div><br>
</div>
<div>Is there anything comparable, in terms of compression
effectiveness, when using alpha transparency and JPEG
compression?<br>
Should I change the type of compression?<br>
</div>
</div>
</blockquote>
<p>require to create a mask band from the 4th band of the input by
changing -b 4 to -mask 4, removing -co ALPHA=YES, and then you can
ask YCbCr<br>
</p>
<p>gdal_translate -b 1 -b 2 -b 3 -mask 4 -co BIGTIFF=YES -co
COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -co JPEG_QUALITY=75 -co
TILED=YES -co NUM_THREADS=ALL_CPUS warp.vrt output.tif</p>
<p>Note: if you use the COG driver it will do that automatically for
you:</p>
<p>gdal_translate -of COG -co BIGTIFF=YES -co COMPRESS=JPEG -co
NUM_THREADS=ALL_CPUS warp.vrt output.tif</p>
<blockquote type="cite"
cite="mid:CAHEdGZMQLNDekbz5qQ64oifw8vW2ZhUVrkRty6VHq3Uc-dgfKg@mail.gmail.com">
<div dir="ltr">
<div><br>
</div>
<div>Thank you,</div>
<div><br>
</div>
<div>Andrea</div>
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> </div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" 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 dir="ltr"><span
style="font-size:small">___________________</span><br>
</div>
<div dir="ltr"><span
style="font-size:small"><br>
</span></div>
<div dir="ltr">Andrea Borruso<br>
website: <a
href="https://medium.com/tantotanto"
target="_blank"
moz-do-not-send="true"
class="moz-txt-link-freetext">https://medium.com/tantotanto</a><br>
38° 7' 48" N, 13° 21' 9" E, EPSG:4326<br>
<span style="font-size:small">___________________</span><br>
<br>
"cercare e saper riconoscere chi e
cosa,<br>
in mezzo all’inferno, non è inferno, <br>
e farlo durare, e dargli spazio"<br>
<br>
Italo Calvino<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</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>