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

Improved imagick error

parent cdf55cc0
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,7 @@ func processImage(config *Config, client *redis.Client, value string) { ...@@ -47,6 +47,7 @@ func processImage(config *Config, client *redis.Client, value string) {
} }
wandLinear := wand.Clone() wandLinear := wand.Clone()
defer wand.Clear()
err = wandLinear.TransformImageColorspace(imagick.COLORSPACE_RGB) err = wandLinear.TransformImageColorspace(imagick.COLORSPACE_RGB)
if err != nil { if err != nil {
panic(err) panic(err)
......
...@@ -10,7 +10,7 @@ import ( ...@@ -10,7 +10,7 @@ import (
func resize(wand *imagick.MagickWand, wandLinear *imagick.MagickWand, size Size, quality Quality, target string) error { func resize(wand *imagick.MagickWand, wandLinear *imagick.MagickWand, size Size, quality Quality, target string) error {
var err error var err error
var mw *imagick.MagickWand var mw *imagick.MagickWand
defer mw.Destroy() defer mw.Clear()
if size.Width == 0 && size.Height == 0 { if size.Width == 0 && size.Height == 0 {
mw = wand.Clone() mw = wand.Clone()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment