Use Magickwand to handle images. (#1212)

* Add MagickWand perf test.

* Use MagickWand.

* Calculate the right thumbnail dimension.

* Remove magick bin file.

* Add building dependencies.

* Build images.

* Add --no-install-recommends

* Remove unused field.

* Fix typo

* Use uint in the worker.

* Add guard

* Always update apt.

* Fix EncodeJpeg() with the quality

* Rename the local error with a better name.

* Add worker.Terminate()

* Fix typo

* Rebase with master and rollback the build workflow.
This commit is contained in:
Googol Lee
2025-06-03 22:04:03 +02:00
committed by GitHub
parent c390f83355
commit 535f8e57fd
14 changed files with 236 additions and 336 deletions

View File

@@ -122,7 +122,7 @@ func TestFullScan(t *testing.T) {
slices.Sort(got)
if diff := cmp.Diff(got, want); diff != "" {
t.Errorf("all media diff:\n%s", diff)
t.Errorf("all media diff (-got, +want):\n%s", diff)
}
})
@@ -168,7 +168,7 @@ func TestFullScan(t *testing.T) {
slices.Sort(got)
if diff := cmp.Diff(got, want, cmp.Comparer(equalNameWithoutSuffix)); diff != "" {
t.Errorf("all media diff:\n%s", diff)
t.Errorf("all media diff (-got, +want):\n%s", diff)
}
})
@@ -202,7 +202,7 @@ func TestFullScan(t *testing.T) {
got := groupMediaWithFaces(allImageFaces)
if diff := cmp.Diff(got, wantFaceGroups); diff != "" {
t.Errorf("all media diff:\n%s", diff)
t.Errorf("all media diff (-got, +want):\n%s", diff)
}
})
}