func ImageFromPath(path string, tag *name.Tag) (v1.Image, error) {
	return Image(pathOpener(path), tag)
}
ImageFromPath returns a v1.Image from a tarball located on path.
package tarball
import (
	"archive/tar"
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"sync"
	"github.com/google/go-containerregistry/pkg/name"
	v1 "github.com/google/go-containerregistry/pkg/v1"
	"github.com/google/go-containerregistry/pkg/v1/partial"
	"github.com/google/go-containerregistry/pkg/v1/types"
	"github.com/google/go-containerregistry/pkg/v1/v1util"
)
type image struct {
	opener        Opener
	td            *tarDescriptor
	config        []byte
	imgDescriptor *singleImageTarDescriptor
	tag *name.Tag
}
type uncompressedImage struct {
	*image
}
type compressedImage struct {
	*image
	manifestLock sync.Mutex  
	manifest     *v1.Manifest
}
var _ partial.UncompressedImageCore = (*uncompressedImage)(nil)
var _ partial.CompressedImageCore = (*compressedImage)(nil)
type Opener func() (io.ReadCloser, error)
func pathOpener(path string) Opener {
	return func() (io.ReadCloser, error) {
		return os.Open(path)
	}
}