image

package
v0.0.0-...-ac71222 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package image provides utilities to detect image MIME types and read embedded image metadata (EXIF or PNG tEXt).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContextFromFile

func NewContextFromFile(path string) (*types.ImageMetadataContext, error)

func NewContextFromReader

func NewContextFromReader(in io.ReadSeeker) (*types.ImageMetadataContext, error)

Types

type File

type File struct {
	*os.File
	MIME string
}

Wrapper around an os.File, adding MIME type detection

func NewFile

func NewFile(fin *os.File) *File

func OpenFile

func OpenFile(path string) (*File, error)

func (*File) Ext

func (file *File) Ext() string

func (*File) IsImage

func (file *File) IsImage() bool

func (*File) Name

func (file *File) Name() string

func (*File) Path

func (file *File) Path() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL