Documentation ¶
Index ¶
- func Decode(source io.Reader, mt string, mwh ...int) (i image.Image, err error)
- func NudeFilter(img image.Image) (image.Image, interface{})
- func Urlify(url string, maxwidth, maxheight int, filters ...Filter) (ret string, tags []interface{}, err error)
- func UrlifyC(c *http.Client, url string, maxwidth, maxheight int, filters ...Filter) (ret string, tags []interface{}, err error)
- func UrlifyR(source io.Reader, mt string, maxwidth, maxheight int, filters ...Filter) (ret string, tags []interface{}, err error)
- type Filter
- type Request
- type Response
- type TranscodeService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NudeFilter ¶
NudeFilter checks if the image may be a nude image and returns a boolean tag accordingly.
func Urlify ¶
func Urlify(url string, maxwidth, maxheight int, filters ...Filter) (ret string, tags []interface{}, err error)
Urilfy fetches the image referenced by the given url, scales it to the given sizes keeping the aspect ratio and transcods it to a base64 encoded data url.
func UrlifyC ¶
func UrlifyC(c *http.Client, url string, maxwidth, maxheight int, filters ...Filter) (ret string, tags []interface{}, err error)
UrilfyC fetches the image referenced by the given url, scales it to the given sizes keeping the aspect ratio and transcods it to a base64 encoded data url. Hereby the given http Client is used.
Types ¶
type TranscodeService ¶
type TranscodeService struct {
// contains filtered or unexported fields
}
func NewTranscodeService ¶
func NewTranscodeService(worker, buffersize int) (ret *TranscodeService)
NewTranscodeService creates worker routines that transcode images in parallel. The amount of worker routines is taken from parameters including the size of the input and output channel buffer.
func (*TranscodeService) Full ¶
func (t *TranscodeService) Full() bool
func (*TranscodeService) Get ¶
func (t *TranscodeService) Get() *Response
func (*TranscodeService) Push ¶
func (t *TranscodeService) Push(r *Request)
func (*TranscodeService) Ready ¶
func (t *TranscodeService) Ready() bool
Click to show internal directories.
Click to hide internal directories.