thats as good as the crappy gif example will get

This commit is contained in:
tinyzimmer
2020-10-08 09:23:04 +03:00
parent 8b72e74561
commit ce95696cc5

View File

@@ -6,7 +6,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"image" "image"
"image/color/palette"
"image/gif" "image/gif"
"image/jpeg" "image/jpeg"
"os" "os"
@@ -179,7 +178,7 @@ func encodeGif(mainLoop *gst.MainLoop) error {
} }
// Create a new paletted image with the same bounds as the pulled one // Create a new paletted image with the same bounds as the pulled one
frame := image.NewPaletted(img.Bounds(), palette.Plan9) frame := image.NewPaletted(img.Bounds(), video.FormatRGB8P.Palette())
// Iterate the bounds of the image and set the pixels in their correct place. // Iterate the bounds of the image and set the pixels in their correct place.
for x := 1; x <= img.Bounds().Dx(); x++ { for x := 1; x <= img.Bounds().Dx(); x++ {