Skip to content
Snippets Groups Projects
Verified Commit b2fd36e6 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Improve colorspace handling

parent e7084d5b
No related branches found
No related tags found
No related merge requests found
......@@ -11,15 +11,19 @@ func resize(wand *imagick.MagickWand, wandLinear *imagick.MagickWand, size Size,
var err error
var mw *imagick.MagickWand
colorSpace := mw.GetImageColorspace()
var colorSpace imagick.ColorspaceType
if size.Width == 0 && size.Height == 0 {
mw = wand.Clone()
defer mw.Destroy()
colorSpace = mw.GetImageColorspace()
} else {
mw = wandLinear.Clone()
defer mw.Destroy()
colorSpace = mw.GetImageColorspace()
width := mw.GetImageWidth()
height := mw.GetImageHeight()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment