You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: exif.go
    path of file: ./repos/picfit/engine/backend
    
    the code of the file until where you have to start completion: package backend

import (
	"image"
	"io"

	"github.com/go-spectest/imaging"
	"github.com/rwcarlsen/goexif/exif"
	_ "golang.org/x/image/webp"
)

// Decode is image.Decode handling orientation in EXIF tags if exists.
// Requires io.ReadSeeker instead of io.Reader.
func decode(reader io.ReadSeeker) (image.Image, error) {
	img, err := imaging.Decode(reader)
	if err != nil {
		return nil, err
	}
	if _, err = reader.Seek(0, io.SeekStart); err != nil {
		return nil, err
	}
	orientation := getOrientation(reader)
	switch orientation {
	case "1":
		return img, nil
	case "2":
		return imaging.FlipV(img), nil
	case "3":
		return i
    
func decode(reader io.ReadSeeker) (image.Image, error) {
	img, err := imaging.Decode(reader)
	if err != nil {
		return nil, err
	}
	if _, err = reader.Seek(0, io.SeekStart); err != nil {
		return nil, err
	}
	orientation := getOrientation(reader)
	switch orientation {
	case "1":
		return img, nil
	case "2":
		return imaging.FlipV(img), nil
	case "3":
		return imaging.Rotate180(img), nil
	case "4":
		return imaging.Rotate180(imaging.FlipV(img)), nil
	case "5":
		return imaging.Rotate270(imaging.FlipV(img)), nil
	case "6":
		return imaging.Rotate270(img), nil
	case "7":
		return imaging.Rotate90(imaging.FlipV(img)), nil
	case "8":
		return imaging.Rotate90(img), nil
	default:
		return img, nil
	}
}