func GenerateCover(c *gin.Context) {
	var err error

	cq, err := ParseCoverQuery(c.Request.URL.Query())
	if err != nil {
		_ = c.Error(err)
		c.String(http.StatusBadRequest, "%v", err)
		return
	}

	output, err := w.Handle(&cq)
	if err != nil {
		_ = c.Error(err)
		c.String(http.StatusInternalServerError, "%v", err)
		return
	}

	c.Set("cq", &cq)

	// set cache control
	c.DataFromReader(http.StatusOK, int64(output.Len()), "image/jpeg", output, map[string]string{})
}
// GenerateCover generate cover and returns it in gif format
GenerateCover generate cover and returns it in gif format
// GenerateCover generate cover and returns it in gif format
func GenerateCover(c *gin.Context) {
	var err error
	cq, err := ParseCoverQuery(c.Request.URL.Query())
	if err != nil {
		_ = c.Error(err)
		c.String(http.StatusBadRequest, "%v", err)
		return
	}
	output, err := w.Handle(&cq)
	if err != nil {
		_ = c.Error(err)
		c.String(http.StatusInternalServerError, "%v", err)
		return
	}
	c.Set("cq", &cq)
	c.DataFromReader(http.StatusOK, int64(output.Len()), "image/jpeg", output, map[string]string{})
}
func GenerateCover ( c * gin . Context ) { var err error cq , err := ParseCoverQuery ( c . Request . URL . Query ( ) ) if err != nil { _ = c . Error ( err ) c . String ( http . StatusBadRequest , " " , err ) return } output , err := w . Handle ( & cq ) if err != nil { _ = c . Error ( err ) c . String ( http . StatusInternalServerError , " " , err ) return } c . Set ( " " , & cq ) c . DataFromReader ( http . StatusOK , int64 ( output . Len ( ) ) , " " , output , map [ string ] string { } ) }
GenerateCover generate cover and returns it in gif format
GenerateCover generate cover and returns it in gif format
// set cache control