.controllers._gif.Frames
- class controllers._gif.frames.Frames(gif_info: model.gif_info.GifInfo)
Holds individual GIF file frames as a list of bytes
Initializer
- controllers._gif.Frames.__init__(self, gif_info: model.gif_info.GifInfo)
Initializes a new Frames object, which loads the GIF file frames
- Parameters
gif_info (model.GifInfo) – Object containing the GIF file information
Location
/controllers/_gif/frames.py
Internal module functions
- controllers._gif.frames._load_all(info: model.gif_info.GifInfo) list[bytes]
Returns all GIF file frames into a list of bytes.
- Parameters
info (model.GifInfo) – Object containing the GIF file information
- controllers._gif.frames._load(frame: numpy.ndarray, info: model.gif_info.GifInfo) bytes
Returns a GIF file frame as bytes
- Parameters
frame (numpy.ndarray) – Frame to be loaded
info (model.GifInfo) – Object containing the GIF file information
- controllers._gif.frames._png_load(frame: numpy.ndarray) bytes
Loads a GIF frame to .png and returns it as bytes
- Parameters
frame (numpy.ndarray) – Frame to be loaded
- controllers._gif.frames._png_resize_load(frame: numpy.ndarray, info: model.gif_info.GifInfo) bytes
Loads a GIF frame, while resizing it, to a .png bytes
- Parameters
frame (numpy.ndarray) – Frame to be loaded
info (model.GifInfo) – Object containing the GIF file information
- Returns
.png contents
- Return type
bytes