func ProcessImageInput(ctx context.Context, imageInput string) ([]byte, error) {
	regex := regexp.MustCompile(base64RE)
	if regex.MatchString(imageInput) {
		d, err := ProcessBase64Image(imageInput)
		return d, err
	}

	// assume input is a URL. Read it.
	return ReadImageFromURL(ctx, imageInput)
}
// ProcessImageInput transforms an image string either from a base64 encoded
// string, or from a URL, and returns the image as a byte slice
ProcessImageInput transforms an image string either from a base64 encoded
string, or from a URL, and returns the image as a byte slice
// ProcessImageInput transforms an image string either from a base64 encoded // string or from a URL and returns the image as a byte slice
func ProcessImageInput(ctx context.Context, imageInput string) ([]byte, error) {
	regex := regexp.MustCompile(base64RE)
	if regex.MatchString(imageInput) {
		d, err := ProcessBase64Image(imageInput)
		return d, err
	}
	return ReadImageFromURL(ctx, imageInput)
}
func ProcessImageInput ( ctx context . Context , imageInput string ) ( [ ] byte , error ) { regex := regexp . MustCompile ( base64RE ) if regex . MatchString ( imageInput ) { d , err := ProcessBase64Image ( imageInput ) return d , err } return ReadImageFromURL ( ctx , imageInput ) }
ProcessImageInput transforms an image string either from a base64 encoded
string, or from a URL, and returns the image as a byte slice
ProcessImageInput transforms an image string either from a base64 encoded string or from a URL and returns the image as a byte slice
// assume input is a URL. Read it.