Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
func Convert(ctx context.Context, input io.Reader, outputFilename string, outputWriter io.Writer, format string, width, height int, extraArgs ...string) error
Convert converts lottie data an image or image(s) using lottieconverter.
Args:
- input: an io.Reader containing the lottie data to convert.
- outputFilename: the filename to write the output to.
- outputWriter: an io.Writer to write the output to.
- format: the output format. Can be one of: png, gif, or pngs.
- width: the width of the output image(s).
- height: the height of the output image(s).
- extraArgs: additional arguments to pass to lottieconverter.
The outputFilename and outputWriter parameters are mutually exclusive.
func FFmpegConvert ¶ added in v0.8.1
func FFmpegConvert(ctx context.Context, input io.Reader, outputFile string, width, height, fps int) (thumbnailData []byte, err error)
FFmpegConvert converts lottie data to a video or image using ffmpeg.
This function should only be called if ffmpeg.Supported returns true.
Args:
- input: an io.Reader containing the lottie data to convert.
- outputFile: the filename to write the output to. Must have .webp or .webm extension.
- width: the width of the output video or image.
- height: the height of the output video or image.
- fps: the framerate of the output video.
Returns: the converted data as a *bytes.Buffer, the mimetype of the output, and the thumbnail data as a PNG.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.