From 889a9f1670e93d6c43148116bb4bf15fbc7bead0 Mon Sep 17 00:00:00 2001
From: Andreas Schenk <andreas_schenk@hms.harvard.edu>
Date: Fri, 6 Dec 2013 14:33:08 -0500
Subject: [PATCH] added PHOTOMETRIC tiff tag to tiff export

---
 modules/io/src/img/map_io_tiff_handler.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/io/src/img/map_io_tiff_handler.cc b/modules/io/src/img/map_io_tiff_handler.cc
index 4be8a815e..cd0ad364c 100644
--- a/modules/io/src/img/map_io_tiff_handler.cc
+++ b/modules/io/src/img/map_io_tiff_handler.cc
@@ -324,6 +324,7 @@ void MapIOTiffHandler::do_export(const img::MapHandle& image,TIFF* tfile,TIF& fo
   TIFFSetField(tfile,TIFFTAG_YRESOLUTION,yreso);
   TIFFSetField(tfile,TIFFTAG_PLANARCONFIG,1);
   TIFFSetField(tfile,TIFFTAG_ORIENTATION,ORIENTATION_TOPLEFT);
+  TIFFSetField(tfile,TIFFTAG_PHOTOMETRIC,1); // 1=zero is black
   if(image.GetDomain()!=img::SPATIAL){
     throw IOException("Frequency export not implemented.");
   }
-- 
GitLab