func (ref ostreeReference) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error) {
	var tmpDir string
	if sys == nil || sys.OSTreeTmpDirPath == "" {
		tmpDir = os.TempDir()
	} else {
		tmpDir = sys.OSTreeTmpDirPath
	}
	src, err := newImageSource(tmpDir, ref)
	if err != nil {
		return nil, err
	}
	return image.FromSource(ctx, sys, src)
}
func (ref ostreeReference) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error) {
	var tmpDir string
	if sys == nil || sys.OSTreeTmpDirPath == "" {
		tmpDir = os.TempDir()
	} else {
		tmpDir = sys.OSTreeTmpDirPath
	}
	src, err := newImageSource(tmpDir, ref)
	if err != nil {
		return nil, err
	}
	return image.FromSource(ctx, sys, src)
}
func ( ref ostreeReference ) NewImage ( ctx context . Context , sys * types . SystemContext ) ( types . ImageCloser , error ) { var tmpDir string if sys == nil || sys . OSTreeTmpDirPath == " " { tmpDir = os . TempDir ( ) } else { tmpDir = sys . OSTreeTmpDirPath } src , err := newImageSource ( tmpDir , ref ) if err != nil { return nil , err } return image . FromSource ( ctx , sys , src ) }
// NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport.
// The caller must call .Close() on the returned ImageCloser.
// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,
// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.
NewImage returns a types . ImageCloser for this reference possibly specialized for this ImageTransport . The caller must call . Close () on the returned ImageCloser . NOTE : If any kind of signature verification should happen build an UnparsedImage from the value returned by NewImageSource verify that UnparsedImage and convert it into a real Image via image . FromUnparsedImage .