From c34e92d27fce3bb0d657de42c83c79b4e73c15e7 Mon Sep 17 00:00:00 2001 From: Alip Date: Wed, 16 Oct 2024 00:46:48 +0700 Subject: [PATCH 1/3] update imagick version to v3 --- go.mod | 2 +- go.sum | 4 ++-- render/jpeg2k/lib_jpeg2k_encoder.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 6e082e8a..8cf80d47 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( google.golang.org/api v0.114.0 google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 google.golang.org/protobuf v1.30.0 - gopkg.in/gographics/imagick.v2 v2.6.0 + gopkg.in/gographics/imagick.v3 v3.7.1 ) require ( diff --git a/go.sum b/go.sum index 4d37d19d..48d81770 100644 --- a/go.sum +++ b/go.sum @@ -224,8 +224,8 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/gographics/imagick.v2 v2.6.0 h1:ewRsUQk3QkjGumERlndbFn/kTYRjyMaPY5gxwpuAhik= -gopkg.in/gographics/imagick.v2 v2.6.0/go.mod h1:/QVPLV/iKdNttRKthmDkeeGg+vdHurVEPc8zkU0XgBk= +gopkg.in/gographics/imagick.v3 v3.7.1 h1:YS5haF8HrPzDJJ2+o6ciLgdaUwYqI5wlSJpg7WcnTIs= +gopkg.in/gographics/imagick.v3 v3.7.1/go.mod h1:+Q9nyA2xRZXrDyTtJ/eko+8V/5E7bWYs08ndkZp8UmA= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/render/jpeg2k/lib_jpeg2k_encoder.go b/render/jpeg2k/lib_jpeg2k_encoder.go index 4c5a215f..3c10732a 100644 --- a/render/jpeg2k/lib_jpeg2k_encoder.go +++ b/render/jpeg2k/lib_jpeg2k_encoder.go @@ -13,7 +13,7 @@ import ( "github.com/unidoc/unipdf/v3/core" "github.com/unidoc/unipdf/v3/model" - "gopkg.in/gographics/imagick.v2/imagick" + "gopkg.in/gographics/imagick.v3/imagick" ) // Custom encoder declaration that implements StreamEncoder interface. From cce08d40e950f83bacca00da80c6d1a1d90fc2e0 Mon Sep 17 00:00:00 2001 From: Alip Date: Wed, 16 Oct 2024 01:02:23 +0700 Subject: [PATCH 2/3] add install imagemagick --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6277cc81..56de4d09 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -24,7 +24,7 @@ jobs: - name: Setup ImageMagick's MagickWand run: - sudo apt-get install libmagickwand-dev + sudo apt-get install libmagickwand-dev imagemagick - name: Build all run: | From 21ac67f9c2024f9d1051fa4825c4fd199c88e607 Mon Sep 17 00:00:00 2001 From: Alip Date: Wed, 16 Oct 2024 01:09:07 +0700 Subject: [PATCH 3/3] downgrade imagick version --- go.mod | 2 +- go.sum | 4 ++-- render/jpeg2k/lib_jpeg2k_encoder.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 8cf80d47..3b7dc558 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( google.golang.org/api v0.114.0 google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 google.golang.org/protobuf v1.30.0 - gopkg.in/gographics/imagick.v3 v3.7.1 + gopkg.in/gographics/imagick.v2 v2.7.0 ) require ( diff --git a/go.sum b/go.sum index 48d81770..8124d199 100644 --- a/go.sum +++ b/go.sum @@ -224,8 +224,8 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/gographics/imagick.v3 v3.7.1 h1:YS5haF8HrPzDJJ2+o6ciLgdaUwYqI5wlSJpg7WcnTIs= -gopkg.in/gographics/imagick.v3 v3.7.1/go.mod h1:+Q9nyA2xRZXrDyTtJ/eko+8V/5E7bWYs08ndkZp8UmA= +gopkg.in/gographics/imagick.v2 v2.7.0 h1:Acluvnk5MhtETFX4EVnt9NbjC32ROaaC3bx6nJueHJk= +gopkg.in/gographics/imagick.v2 v2.7.0/go.mod h1:/QVPLV/iKdNttRKthmDkeeGg+vdHurVEPc8zkU0XgBk= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/render/jpeg2k/lib_jpeg2k_encoder.go b/render/jpeg2k/lib_jpeg2k_encoder.go index 3c10732a..4c5a215f 100644 --- a/render/jpeg2k/lib_jpeg2k_encoder.go +++ b/render/jpeg2k/lib_jpeg2k_encoder.go @@ -13,7 +13,7 @@ import ( "github.com/unidoc/unipdf/v3/core" "github.com/unidoc/unipdf/v3/model" - "gopkg.in/gographics/imagick.v3/imagick" + "gopkg.in/gographics/imagick.v2/imagick" ) // Custom encoder declaration that implements StreamEncoder interface.