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

Improve colorspace handling

parent ae56cc6c
No related branches found
No related tags found
No related merge requests found
......@@ -18,11 +18,17 @@ func resize(wand *imagick.MagickWand, wandLinear *imagick.MagickWand, size Size,
defer mw.Destroy()
colorSpace = mw.GetImageColorspace()
if colorSpace == imagick.COLORSPACE_UNDEFINED {
colorSpace = imagick.COLORSPACE_SRGB
}
} else {
mw = wandLinear.Clone()
defer mw.Destroy()
colorSpace = mw.GetImageColorspace()
if colorSpace == imagick.COLORSPACE_UNDEFINED {
colorSpace = imagick.COLORSPACE_SRGB
}
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