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

Properly handle color profiles

parent b2fd36e6
No related branches found
No related tags found
No related merge requests found
......@@ -96,7 +96,14 @@ func resize(wand *imagick.MagickWand, wandLinear *imagick.MagickWand, size Size,
}
mw.StripImage()
mw.SetImageColorspace(colorSpace)
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment