From 52fe5e589140321966723aaf97a8c873ac3aae6b Mon Sep 17 00:00:00 2001
From: Janne Koschinski <janne@kuschku.de>
Date: Mon, 30 Apr 2018 05:08:45 +0200
Subject: [PATCH] Remove debugging functionality

Signed-off-by: Janne Koschinski <janne@kuschku.de>
---
 main.go |  1 -
 util.go | 61 ---------------------------------------------------------
 2 files changed, 62 deletions(-)

diff --git a/main.go b/main.go
index 3e4df08..24391d4 100644
--- a/main.go
+++ b/main.go
@@ -54,7 +54,6 @@ func processImage(config *Config, client *redis.Client, value string) {
 	if colorSpace == imagick.COLORSPACE_UNDEFINED {
 		colorSpace = imagick.COLORSPACE_SRGB
 	}
-	println(colorSpaceName(colorSpace))
 
 	err = wandLinear.TransformImageColorspace(imagick.COLORSPACE_RGB)
 	if err != nil {
diff --git a/util.go b/util.go
index d8939c7..9cb4d78 100644
--- a/util.go
+++ b/util.go
@@ -7,58 +7,6 @@ import (
 	"math"
 )
 
-func colorSpaceName(colorSpace imagick.ColorspaceType) string {
-	if colorSpace == imagick.COLORSPACE_UNDEFINED {
-		return "COLORSPACE_UNDEFINED"
-	} else if colorSpace == imagick.COLORSPACE_RGB {
-		return "COLORSPACE_RGB"
-	} else if colorSpace == imagick.COLORSPACE_GRAY {
-		return "COLORSPACE_GRAY"
-	} else if colorSpace == imagick.COLORSPACE_TRANSPARENT {
-		return "COLORSPACE_TRANSPARENT"
-	} else if colorSpace == imagick.COLORSPACE_OHTA {
-		return "COLORSPACE_OHTA"
-	} else if colorSpace == imagick.COLORSPACE_LAB {
-		return "COLORSPACE_LAB"
-	} else if colorSpace == imagick.COLORSPACE_XYZ {
-		return "COLORSPACE_XYZ"
-	} else if colorSpace == imagick.COLORSPACE_YCBCR {
-		return "COLORSPACE_YCBCR"
-	} else if colorSpace == imagick.COLORSPACE_YCC {
-		return "COLORSPACE_YCC"
-	} else if colorSpace == imagick.COLORSPACE_YIQ {
-		return "COLORSPACE_YIQ"
-	} else if colorSpace == imagick.COLORSPACE_YPBPR {
-		return "COLORSPACE_YPBPR"
-	} else if colorSpace == imagick.COLORSPACE_YUV {
-		return "COLORSPACE_YUV"
-	} else if colorSpace == imagick.COLORSPACE_CMYK {
-		return "COLORSPACE_CMYK"
-	} else if colorSpace == imagick.COLORSPACE_SRGB {
-		return "COLORSPACE_SRGB"
-	} else if colorSpace == imagick.COLORSPACE_HSB {
-		return "COLORSPACE_HSB"
-	} else if colorSpace == imagick.COLORSPACE_HSL {
-		return "COLORSPACE_HSL"
-	} else if colorSpace == imagick.COLORSPACE_HWB {
-		return "COLORSPACE_HWB"
-	} else if colorSpace == imagick.COLORSPACE_REC601LUMA {
-		return "COLORSPACE_REC601LUMA"
-	} else if colorSpace == imagick.COLORSPACE_REC601YCBCR {
-		return "COLORSPACE_REC601YCBCR"
-	} else if colorSpace == imagick.COLORSPACE_REC709LUMA {
-		return "COLORSPACE_REC709LUMA"
-	} else if colorSpace == imagick.COLORSPACE_REC709YCBCR {
-		return "COLORSPACE_REC709YCBCR"
-	} else if colorSpace == imagick.COLORSPACE_LOG {
-		return "COLORSPACE_LOG"
-	} else if colorSpace == imagick.COLORSPACE_CMY {
-		return "COLORSPACE_CMY"
-	} else {
-		return "Unknown"
-	}
-}
-
 func resize(wand *imagick.MagickWand, wandLinear *imagick.MagickWand, originalColorSpace imagick.ColorspaceType, size Size, quality Quality, target string) error {
 	var err error
 	var mw *imagick.MagickWand
@@ -142,15 +90,6 @@ func resize(wand *imagick.MagickWand, wandLinear *imagick.MagickWand, originalCo
 	}
 
 	mw.StripImage()
-	iccProfile := wand.GetImageProfile("ICC")
-	if iccProfile != "" {
-		mw.SetImageProfile("ICC", []byte(iccProfile))
-	}
-	iptcProfile := wand.GetImageProfile("IPTC")
-	if iptcProfile != "" {
-		mw.SetImageProfile("IPTC", []byte(iptcProfile))
-	}
-
 	err = mw.WriteImage(target)
 
 	return err
-- 
GitLab