ReadFrames updated to return RGBA image slice

This commit is contained in:
Krzysztofz01 2023-08-29 10:55:14 +02:00
parent a1d63d0f9f
commit f6a2909ea3
3 changed files with 10 additions and 15 deletions

View file

@ -410,11 +410,8 @@ func TestReadFramesShouldReturnCorrectFrames(t *testing.T) {
t.Errorf("Failed to read frames: %s", err)
}
for index, buffer := range frames {
for index, actualFrame := range frames {
expectedFrame := expectedFrames[index]
actualFrame := image.NewRGBA(image.Rect(0, 0, 480, 270))
copy(actualFrame.Pix, buffer)
for xIndex := 0; xIndex < expectedFrame.Bounds().Dx(); xIndex += 1 {
for yIndex := 0; yIndex < expectedFrame.Bounds().Dy(); yIndex += 1 {
eR, eG, eB, eA := expectedFrame.At(xIndex, yIndex).RGBA()