mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-05 16:06:55 +08:00
thats as good as the crappy gif example will get
This commit is contained in:
@@ -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++ {
|
||||||
|
Reference in New Issue
Block a user