Documentation ¶
Index ¶
- Variables
- func ImageFromBytes(b []byte) (img image.Image, err error)
- func ImageFromReader(r io.Reader) (img image.Image, err error)
- func MakePhash(filename string) (b []byte, err error)
- func MakeThumb(in io.Reader, out io.Writer, maxDimension int) error
- func MakeThumbFromFile(filepath string, out io.Writer, maxDimension int) error
- func OpenImage(filename string) (img image.Image, err error)
- func Phash(r io.Reader) (b []byte, err error)
- func ReduceImageSize(img image.Image, w io.Writer, maxDimension int) error
- func ResizeImage(img image.Image, width, height int) image.Image
- func RunFfmpeg(r io.Reader, w io.Writer, args ...string) error
- func SetPhashScale(scale int)
- type Phasher
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ImageFromReader ¶ added in v0.0.4
func MakeThumbFromFile ¶ added in v0.0.5
func OpenImage ¶
OpenImage opens a media file from disk and attempts to decode it into an image.Image. If the file is not an image, it will be passed to MakeThumbnail to generate a thumbnail. This function currently only returns thumbnails in case of non StdImage media. Either change the function name or make an ffmpeg command which returns first frame of video/decodes image to jpg.
For this package, this functionality with thumbnails is preferred.
func ReduceImageSize ¶ added in v0.0.4
func ResizeImage ¶
ResizeImage resizes the given image to the specified width and height.
func SetPhashScale ¶ added in v0.0.4
func SetPhashScale(scale int)
Types ¶
Click to show internal directories.
Click to hide internal directories.