artwork

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MethodLocal    = "locl"
	MethodDownload = "down"
	FormatPNG      = "PNGf"
	FormatJPEG     = "JPEG"
	FormatARGB     = "ARGb"
	Itunes9        = 208
	ItunesOld      = 216
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ARTW

type ARTW struct {
	Header   *FrameHeader
	Unknown1 []byte
}

func NewARTW

func NewARTW(itc *ITC, header *FrameHeader) (*ARTW, error)

type ArtworkDB

type ArtworkDB struct {
	// contains filtered or unexported fields
}

func NewArtworkDB

func NewArtworkDB(homedir string, libid pid.PersistentID) (*ArtworkDB, error)

func (*ArtworkDB) Close added in v0.2.7

func (db *ArtworkDB) Close() error

func (*ArtworkDB) GetArtworkFile

func (db *ArtworkDB) GetArtworkFile(id pid.PersistentID) (string, error)

func (*ArtworkDB) GetArtworkItem

func (db *ArtworkDB) GetArtworkItem(id pid.PersistentID) (*ArtworkItem, error)

func (*ArtworkDB) GetArtworkURL added in v0.2.1

func (db *ArtworkDB) GetArtworkURL(id pid.PersistentID) (string, error)

func (*ArtworkDB) GetJPEG

func (db *ArtworkDB) GetJPEG(id pid.PersistentID) ([]byte, error)

type ArtworkItem

type ArtworkItem struct {
	LibraryID    pid.PersistentID `db:"ZDBID"`
	PersistentID pid.PersistentID `db:"ZPERSISTENTID"`
	Hash         string           `db:"ZHASHSTRING"`
	Width        float64          `db:"ZWIDTH"`
	Height       float64          `db:"ZHEIGHT"`
	Format       Format           `db:"ZFORMAT"`
	Kind         int              `db:"ZKIND"`
	URL          *string          `db:"ZURL"`
}

type ArtworkSource

type ArtworkSource interface {
	GetJPEG(id pid.PersistentID) ([]byte, error)
	Close() error
}

func NewArtworkSource

func NewArtworkSource(homedir string, libid pid.PersistentID) (ArtworkSource, error)

type Format

type Format uint32

func (Format) String

func (f Format) String() string

type FrameHeader

type FrameHeader struct {
	Size uint32
	Kind [4]byte
}

type ITC

type ITC struct {
	// contains filtered or unexported fields
}

func NewITC

func NewITC(r io.Reader) *ITC

func (*ITC) Read

func (itc *ITC) Read() (interface{}, error)

type ITCH

type ITCH struct {
	Header   *FrameHeader
	Unknown1 []byte
	Subframe interface{}
}

func NewITCH

func NewITCH(itc *ITC, header *FrameHeader) (*ITCH, error)

type Item

type Item struct {
	Header    *FrameHeader
	Offset    uint32
	Preamble  []byte
	LibraryID uint64
	TrackID   uint64
	Method    string
	Format    string
	Width     int
	Height    int
	Data      []byte
}

func NewItem

func NewItem(itc *ITC, header *FrameHeader) (*Item, error)

func (*Item) ExportJPEG

func (item *Item) ExportJPEG(w io.Writer) error

func (*Item) ExportPNG

func (item *Item) ExportPNG(w io.Writer) error

func (*Item) MakeImage

func (item *Item) MakeImage() (image.Image, error)

func (*Item) ParseARGB

func (item *Item) ParseARGB() (image.Image, error)

func (*Item) ParseJPEG

func (item *Item) ParseJPEG() (image.Image, error)

func (*Item) ParsePNG

func (item *Item) ParsePNG() (image.Image, error)

type ItunesSource

type ItunesSource struct {
	// contains filtered or unexported fields
}

func NewItunesSource

func NewItunesSource(homedir string, libid pid.PersistentID) (*ItunesSource, error)

func (*ItunesSource) Close added in v0.2.7

func (src *ItunesSource) Close() error

func (*ItunesSource) GetJPEG

func (src *ItunesSource) GetJPEG(id pid.PersistentID) ([]byte, error)

Jump to

Keyboard shortcuts

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