Files
Dominik Schmidt 9b4e173020 test(thumbnails): compare the built-in generator against two real imagors
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.
2026-10-19 14:57:35 +02:00

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",
},
},
}
}