[gdal-dev] Edit geotiff in Gimp and don't lose metadata

Matt.Wilkie at yukon.ca Matt.Wilkie at yukon.ca
Thu Jan 13 14:19:00 PST 2022


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.

It gets better: Gimp reads *.msk files without any fuss. This means drastically reduced memory requirements for quickly making simple edits only to the mask layer. So a person can:


-          take a large multiband band geotiff with a mask side car file, squash the 3+ bands into 1 band

-          open the original .msk file in Gimp

-          drag and drop the squashed 1 band file on top the Gimp session

o   selecting import tif as a Layer

-          Lock the imported layer, set to 50% transparent (or whatever). This is the Visual Guide layer.

-          Paint as thou wilt on the base mask layer (Black is Nodata, White is Data)

-          Delete the visual guide layer

-          Export the base mask layer

o   Select tiff File Type

§  use Deflate compression

§  keep metadata (Geotiff will be disabled, that’s okay)

§  use “input-rgb-geotiff.tif.msk” as file name

-          DONE!

(this is so awesome. :)

-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220113/b23fbcb7/attachment.html>


More information about the gdal-dev mailing list