mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-11-01 01:58:34 -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
541 B
Go
21 lines
541 B
Go
package parity
|
|
|
|
func transparencyGroup() parityGroup {
|
|
return parityGroup{
|
|
name: "transparency",
|
|
cases: []parityCase{
|
|
{
|
|
title: "a transparent png keeps its transparency",
|
|
path: "/unsafe/fit-in/32x32/filters:format(png)/",
|
|
source: alphaPNGSource(64), want: "200 32x32 png alpha",
|
|
},
|
|
// jpeg has no alpha channel
|
|
{
|
|
title: "a transparent png loses its transparency as a jpeg",
|
|
path: "/unsafe/fit-in/32x32/filters:format(jpeg)/",
|
|
source: alphaPNGSource(64), want: "200 32x32 jpeg",
|
|
},
|
|
},
|
|
}
|
|
}
|