Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ImageFormat ¶
type ImageFormat string
ImageFormat is the string format of the image
const ( DefaultGifFormat ImageFormat = "GIF" DefaultJpegFormat ImageFormat = "JPEG" DefaultPngFormat ImageFormat = "PNG" DefaultWebmFormat ImageFormat = "WEBM" DefaultMp4Format ImageFormat = "MP4" )
func (ImageFormat) IsGif ¶
func (f ImageFormat) IsGif() bool
IsGif returns true if the type of this image is a GIF.
func (ImageFormat) IsJpeg ¶
func (f ImageFormat) IsJpeg() bool
IsJpeg returns true if the type of this image is a JPEG.
func (ImageFormat) IsMp4 ¶
func (f ImageFormat) IsMp4() bool
IsMp4 returns true if the type of this image is a MP4.
func (ImageFormat) IsPng ¶
func (f ImageFormat) IsPng() bool
IsPng returns true if the type of this image is a PNG.
func (ImageFormat) IsWebm ¶
func (f ImageFormat) IsWebm() bool
IsWebm returns true if the type of this image is a WEBM.
type PixurImage ¶
type PixurImage interface { Format() ImageFormat Dimensions() (width, height uint) // Duration returns how long the image is animated for, or nil if the image is not animated. // It may return 0s. In the future, this could also include a histogram Duration() (*time.Duration, status.S) Thumbnail() (PixurImage, status.S) PerceptualHash0() ([]byte, []float32, status.S) Write(io.Writer) status.S Close() }
func ConvertVideo ¶
func ConvertVideo( ctx context.Context, dstFmt ImageFormat, dst *os.File, r io.Reader) ( _ PixurImage, stscap status.S)
ConvertVideo converts from a source video to a destination. dstName has to be a string because ffmpeg wants to seek the output MP4 file to move the atoms around (like qt-faststart does).
Click to show internal directories.
Click to hide internal directories.