<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:EN-CA;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-CA" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">[5]:
<a href="https://gis.stackexchange.com/a/115560">https://gis.stackexchange.com/a/115560</a><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Oh look at that. Paint.net has supported geotiff tags since at least 2020. However it dumps a stack trace when I try and open the image I used in the Gimp experiment. The size perhaps.<span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">-Matt</span><i><span style="color:#1F497D"><o:p></o:p></span></i></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt">From:</span></b><span lang="EN-US" style="font-size:11.0pt"> gdal-dev <gdal-dev-bounces@lists.osgeo.org>
<b>On Behalf Of </b>Matt.Wilkie@yukon.ca<br>
<b>Sent:</b> January 13, 2022 10:49 AM<br>
<b>To:</b> gdal-dev@lists.osgeo.org<br>
<b>Subject:</b> [gdal-dev] Edit geotiff in Gimp and don't lose metadata<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">I am soooo happy today!
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">I discovered that starting with v2.10.24 Gimp knows about and keeps geotiff tags intact.[0] This means we can use tools like Magic Wand fuzzy select and a host of other tools to
 quickly fix a host of image issues that are difficult to address using command line tools and/or code.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">The big one for me at the moment is dealing with the artifact fringes introduced on image edges when people use jpeg compression.[1] Nearblack is something I keep constantly close
 by, but it can’t deal with areas that are blocked by horizontal scanning.[2] Today I used Gimp to fix the nodata area for 5.5 GB spot image in about 20 minutes, including time with experimentation. True it needed ~45 GB of memory[3] so this isn’t something
 I’ll be doing at home, but it worked! [4] And I didn’t need to fart around afterwards restoring georeferencing.[5]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">[0]:
<a href="https://www.gimp.org/news/2021/03/29/gimp-2-10-24-released/">https://www.gimp.org/news/2021/03/29/gimp-2-10-24-released/</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">[1]:
<a href="https://i.imgur.com/LZNn5Zt.png">https://i.imgur.com/LZNn5Zt.png</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">[2]:
<a href="https://i.imgur.com/avkILmX.png">https://i.imgur.com/avkILmX.png</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">[3]:
<a href="https://i.imgur.com/DVLK1OB.png">https://i.imgur.com/DVLK1OB.png</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">[4]
<a href="https://i.imgur.com/KRfxM0G.png">https://i.imgur.com/KRfxM0G.png</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Some post processing is needed to get things up to our local preferences, for instance Gimp’s alpha channel is 15-20% larger than a gdal external mask and it doesn’t know my new
 favourite compression method of ZSTD, but this is a huge step forward. I could jump for joy, and maybe after I send this message I will ;-)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-top:4.0pt;line-height:115%;text-autospace:none;vertical-align:middle">
<b><span lang="EN-US">Matt Wilkie</span></b><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Geomatics Developer & Administrator<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Environment <span style="color:#2E74B5">|</span> Technology, Innovation and Mapping<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">T 867-667-8133 <span style="color:#2E74B5">
|</span> </span><u><a href="http://yukon.ca/"><span lang="EN-US" style="color:windowtext">Yukon.ca</span></a><o:p></o:p></u></p>
<p class="MsoNormal"><i>Hours: 08:30-16:30, Mon-Wed: Office, Thu: Remote, Fri: Away.<o:p></o:p></i></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>