func GenerateImage(options *ImageOptions) ([]byte, error) {
	arr, err := buildParams(options)
	if err != nil {
		return []byte{}, err
	}
	if options.BinaryPath == "" {
		return []byte{}, errors.New("BinaryPath not set")
	}
	cmd := exec.Command(options.BinaryPath, arr...)
	if options.Html != "" {
		cmd.Stdin = strings.NewReader(options.Html)
	}
	output, err := cmd.CombinedOutput()
	trimmed := cleanupOutput(output, options.Format)
	return trimmed, err
}
GenerateImage creates an image from an input.
It returns the image ([]byte) and any error encountered.
package wkhtmltoimage
import (
	"bytes"
	"errors"
	"image/jpeg"
	"image/png"
	"os/exec"
	"strconv"
	"strings"
)
type ImageOptions struct {
	BinaryPath string
	Input string
	Format string
	Height int
	Width int
	Quality int
	Html string
	Output string
}