func CreateFrameThumbnail(filename string) (*bytes.Buffer, error) {
	img, err := magick.DecodeFile(filename)
	if err != nil {
		// File doesn't exist?
		return nil, err
	}

	// Resize it.
	resized, err := img.Resize(-1, config.Opts.FrameImageHeight, magick.FLanczos)
	if err != nil {
		return nil, err
	}

	// In-memory bytes of the result.
	var plateBytes bytes.Buffer

	// Set output options
	info := magick.NewInfo()
	info.SetQuality(config.Opts.PlateImageQuality)

	// Encode the final image.
	err = resized.Encode(&plateBytes, info)
	if err != nil {
		return nil, err
	}

	return &plateBytes, nil
}
// CreateFrameThumbnail makes a thumbnail and saves it, and returns a pointer to the bytes.
CreateFrameThumbnail makes a thumbnail and saves it, and returns a pointer to the bytes.
// CreateFrameThumbnail makes a thumbnail and saves it and returns a pointer to the bytes .
func CreateFrameThumbnail(filename string) (*bytes.Buffer, error) {
	img, err := magick.DecodeFile(filename)
	if err != nil {
		return nil, err
	}
	resized, err := img.Resize(-1, config.Opts.FrameImageHeight, magick.FLanczos)
	if err != nil {
		return nil, err
	}
	var plateBytes bytes.Buffer
	info := magick.NewInfo()
	info.SetQuality(config.Opts.PlateImageQuality)
	err = resized.Encode(&plateBytes, info)
	if err != nil {
		return nil, err
	}
	return &plateBytes, nil
}
func CreateFrameThumbnail ( filename string ) ( * bytes . Buffer , error ) { img , err := magick . DecodeFile ( filename ) if err != nil { return nil , err } resized , err := img . Resize ( - 1 , config . Opts . FrameImageHeight , magick . FLanczos ) if err != nil { return nil , err } var plateBytes bytes . Buffer info := magick . NewInfo ( ) info . SetQuality ( config . Opts . PlateImageQuality ) err = resized . Encode ( & plateBytes , info ) if err != nil { return nil , err } return & plateBytes , nil }
CreateFrameThumbnail makes a thumbnail and saves it, and returns a pointer to the bytes.
CreateFrameThumbnail makes a thumbnail and saves it and returns a pointer to the bytes .
// File doesn't exist? // Resize it. // In-memory bytes of the result. // Set output options // Encode the final image.