You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to compile the code I get :
hyperlapse.go:217: too few values in struct initializer
According to the golang doc the gif struct is :
type GIF struct {
Image []*image.Paletted // The successive images.
Delay []int // The successive delay times, one per frame, in 100ths of a second.
LoopCount int // The loop count.
// Disposal is the successive disposal methods, one per frame. For
// backwards compatibility, a nil Disposal is valid to pass to EncodeAll,
// and implies that each frame's disposal method is 0 (no disposal
// specified).
Disposal []byte
// Config is the global color table (palette), width and height. A nil or
// empty-color.Palette Config.ColorModel means that each frame has its own
// color table and there is no global color table. Each frame's bounds must
// be within the rectangle defined by the two points (0, 0) and
// (Config.Width, Config.Height).
//
// For backwards compatibility, a zero-valued Config is valid to pass to
// EncodeAll, and implies that the overall GIF's width and height equals
// the first frame's bounds' Rectangle.Max point.
Config image.Config
// BackgroundIndex is the background index in the global color table, for
// use with the DisposalBackground disposal method.
BackgroundIndex byte
}
While in the code we itinialize it like :
&gif.GIF{framesList, delays, 0}
I'm not very familiar with go, so I don't know how to fix this...
Thanks in advance
The text was updated successfully, but these errors were encountered:
When I try to compile the code I get :
hyperlapse.go:217: too few values in struct initializer
According to the golang doc the gif struct is :
While in the code we itinialize it like :
&gif.GIF{framesList, delays, 0}
I'm not very familiar with go, so I don't know how to fix this...
Thanks in advance
The text was updated successfully, but these errors were encountered: