func ProcessBase64Image(imageString string) ([]byte, error) {
	if imageString == "" {
		return nil, fmt.Errorf("empty image string")
	}

	regex := regexp.MustCompile(base64RE)
	matches := regex.FindStringSubmatch(imageString)
	var encodedString string
	if len(matches) > 2 {
		encodedString = regex.FindStringSubmatch(imageString)[2]
	} else {
		encodedString = imageString
	}
	imageData, err := GetDataFromBase64String(encodedString)
	if err != nil {
		return nil, err
	}

	return imageData, nil
}
// ProcessBase64Image transforms a base64 encoded string from a form post and
// returns the image itself as a byte slice.
ProcessBase64Image transforms a base64 encoded string from a form post and
returns the image itself as a byte slice.
// ProcessBase64Image transforms a base64 encoded string from a form post and // returns the image itself as a byte slice .
func ProcessBase64Image(imageString string) ([]byte, error) {
	if imageString == "" {
		return nil, fmt.Errorf("empty image string")
	}
	regex := regexp.MustCompile(base64RE)
	matches := regex.FindStringSubmatch(imageString)
	var encodedString string
	if len(matches) > 2 {
		encodedString = regex.FindStringSubmatch(imageString)[2]
	} else {
		encodedString = imageString
	}
	imageData, err := GetDataFromBase64String(encodedString)
	if err != nil {
		return nil, err
	}
	return imageData, nil
}
func ProcessBase64Image ( imageString string ) ( [ ] byte , error ) { if imageString == " " { return nil , fmt . Errorf ( " " ) } regex := regexp . MustCompile ( base64RE ) matches := regex . FindStringSubmatch ( imageString ) var encodedString string if len ( matches ) > 2 { encodedString = regex . FindStringSubmatch ( imageString ) [ 2 ] } else { encodedString = imageString } imageData , err := GetDataFromBase64String ( encodedString ) if err != nil { return nil , err } return imageData , nil }
ProcessBase64Image transforms a base64 encoded string from a form post and
returns the image itself as a byte slice.
ProcessBase64Image transforms a base64 encoded string from a form post and returns the image itself as a byte slice .