icns

package
v0.0.0-...-ba09903 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IconTypes = []IconType{
	{"ic14", 0, 512, 512, 10.8, "JPEG 2000 or PNG format (256x256@2x retina)"},
	{"ic13", 0, 256, 256, 10.8, "JPEG 2000 or PNG format (128x128@2x retina)"},
	{"ic12", 0, 64, 64, 10.8, "JPEG 2000 or PNG format (32x32@2x retina)"},
	{"ic11", 0, 32, 32, 10.8, "JPEG 2000 or PNG format (16x16@2x retina)"},
	{"ic10", 0, 1024, 1024, 10.7, "JPEG 2000 or PNG format (512x512@2x retina)"},
}

Functions

func FindInApp

func FindInApp(app string) (icons []string, err error)

func FindInFolder

func FindInFolder(folder string) ([]string, error)

func GetIconSize

func GetIconSize(itype string) int

func NormalizeIconName

func NormalizeIconName(path string) string

Types

type IcnsHeader

type IcnsHeader struct {
	Magic    String4
	Filesize uint32
}

func (*IcnsHeader) LoadFromReader

func (ih *IcnsHeader) LoadFromReader(r io.Reader) error

func (*IcnsHeader) String

func (ih *IcnsHeader) String() string

type IconData

type IconData struct {
	IconType String4
	IconLen  uint32
	IconData []byte
}

func (*IconData) LoadFromReader

func (id *IconData) LoadFromReader(r io.Reader) error

func (*IconData) String

func (id *IconData) String() string

type IconFile

type IconFile struct {
	Header IcnsHeader
	Data   []IconData
}

func NewIconFromFile

func NewIconFromFile(filename string) (*IconFile, error)

type IconType

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

type String4

type String4 [4]byte

func (*String4) String

func (s *String4) String() string

Jump to

Keyboard shortcuts

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