<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>Please remove this address for David McKenzie from your mailing list.</DIV>
<DIV>He passed away December 2016.</DIV>
<DIV>Thank you,</DIV>
<DIV>M.H. McKenzie</DIV>
<DIV>May 2019</DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=lucianpls@yahoo.com>Lucian
Plesea</A> </DIV>
<DIV><B>Sent:</B> Friday, May 17, 2019 4:14 PM</DIV>
<DIV><B>To:</B> <A title=gdal-dev@lists.osgeo.org>gdal-dev@lists.osgeo.org</A> ;
<A title=even.rouault@spatialys.com>Even Rouault</A> </DIV>
<DIV><B>Subject:</B> [gdal-dev] COG w/JPEG YCbCr mask</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV class=yahoo-style-wrap
style="FONT-SIZE: 13px; FONT-FAMILY: helvetica neue, helvetica, arial, sans-serif">
<DIV>Hi Even,</DIV>
<DIV> </DIV>
<DIV>
<DIV>
<DIV class=ydp74bd6c0bMsoPlainText>I just read your COG notice from May
3rd.<SPAN> </SPAN>Are you aware of the approach I've used to achieve the
same outcome in MRF JPEG?<SPAN><BR></SPAN></DIV>
<DIV class=ydp74bd6c0bMsoPlainText><SPAN>Most of the code is in <A
href="https://github.com/OSGeo/gdal/blob/master/gdal/frmts/mrf/JPEG_band.cpp"
rel=nofollow
target=_blank>https://github.com/OSGeo/gdal/blob/master/gdal/frmts/mrf/JPEG_band.cpp</A></SPAN></DIV>
<DIV class=ydp74bd6c0bMsoPlainText><SPAN></SPAN>It inserts an RLE encoded bit
mask in the JPEG itself as an application specific chunk (Zen) instead of having
it as a separate entity.<SPAN> </SPAN>I uses the mask to only keep the
locations with zero fixed (thus the Zen name), instead of exposing the mask to
GDAL.<SPAN> Then the zero value can be declared as NoData, eliminating the
noisy JPEG edge issue.</SPAN></DIV>
<DIV class=ydp74bd6c0bMsoPlainText><SPAN>This service uses it: <A
href="http://www.arcgis.com/home/webmap/viewer.html?useExisting=1&layers=c1c4c750a2154842ae523c984cc14fa5"
rel=nofollow
target=_blank>http://www.arcgis.com/home/webmap/viewer.html?useExisting=1&layers=c1c4c750a2154842ae523c984cc14fa5</A><BR></SPAN></DIV>
<DIV class=ydp74bd6c0bMsoPlainText><BR><SPAN></SPAN></DIV>
<DIV class=ydp74bd6c0bMsoPlainText><SPAN></SPAN>The Zen chunk could be exposed
as a mask, but then you have the headache of getting the mask and the normal
bands read and written together, which is not trivial as far as I can
tell.<SPAN> It could also be exposed as a full alpha band. As far as
I can tell, the NoData approach has significantly less overhead, no extra band
blocks to handle. The Zen chunk in JPEG is ignored by older decoders, so
it is backwards compatible.</SPAN><BR></DIV></DIV>
<DIV> </DIV>
<DIV>Lucian<BR></DIV></DIV></DIV>
<P>
<HR>
_______________________________________________<BR>gdal-dev mailing
list<BR>gdal-dev@lists.osgeo.org<BR>https://lists.osgeo.org/mailman/listinfo/gdal-dev</DIV></DIV></DIV></BODY></HTML>