From 1bc7246b628a7cd1e5e83e9c95c8fe34a30cbd3f Mon Sep 17 00:00:00 2001
From: Janne Koschinski <janne@kuschku.de>
Date: Mon, 30 Apr 2018 05:19:38 +0200
Subject: [PATCH] Add debugging info for image color profiles

Signed-off-by: Janne Koschinski <janne@kuschku.de>
---
 util.go | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/util.go b/util.go
index 729a407..449882b 100644
--- a/util.go
+++ b/util.go
@@ -78,6 +78,10 @@ func resize(wand *imagick.MagickWand, wandLinear *imagick.MagickWand, originalCo
 			if err != nil {
 				return err
 			}
+			for key, value := range profiles {
+				println(key)
+				mw.ProfileImage(key, []byte(value))
+			}
 		}
 	}
 
@@ -90,9 +94,6 @@ func resize(wand *imagick.MagickWand, wandLinear *imagick.MagickWand, originalCo
 	}
 
 	mw.StripImage()
-	for key, value := range profiles {
-		mw.SetImageProfile(key, []byte(value))
-	}
 
 	err = mw.WriteImage(target)
 
-- 
GitLab