mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-11-27 10:34:42 -05:00
The same image goes to the built-in generator and to both imagor images, and status, dimensions, format, frames and alpha are compared. A generator that answers differently is held to that answer by a recorded override, so the test fails once the divergence disappears. It runs once per resize implementation, because make test builds the pure Go path while the images ship vips.
21 lines
706 B
Go
21 lines
706 B
Go
package parity
|
|
|
|
// Tika hands over an ICO for a windows executable, and its transparency has to
|
|
// survive the resize. Reading one needs a libvips with ImageMagick.
|
|
func iconGroup() parityGroup {
|
|
return parityGroup{
|
|
name: "icon",
|
|
cases: []parityCase{
|
|
{
|
|
title: "an icon resizes into a png that keeps its transparency",
|
|
path: "/unsafe/fit-in/32x32/filters:format(png)/",
|
|
source: icoSource(64), want: "200 32x32 png alpha",
|
|
generatorOverrides: map[string]override{
|
|
"imagor-default": {answers: "406", because: "that image has no ICO loader, the magick variant has one"},
|
|
"imaging": {answers: "406", because: "the pure Go build reads no ICO"},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|