logo

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneToRGBA

func CloneToRGBA(img image.Image) *image.RGBA

func EncodePNG

func EncodePNG(img image.Image) ([]byte, error)

func IsSupportedFormat

func IsSupportedFormat(ext string) bool

func LoadFromBytes

func LoadFromBytes(data []byte) (image.Image, error)

func LoadFromReader

func LoadFromReader(r io.Reader) (image.Image, error)

func LogoSize

func LogoSize(qrPixelSize int, ratio float64) int
func OverlayLogo(qrImage, logoImg image.Image, _ int) *image.RGBA
func ResizeLogo(img image.Image, qrModules int, ratio float64) *image.RGBA

func ResizeLogoToPixels

func ResizeLogoToPixels(img image.Image, width, height int) *image.RGBA

func SupportedFormats

func SupportedFormats() []string
func TintLogo(img image.Image, tint color.Color) *image.RGBA

func Validate

func Validate(path string) error

Types

type Processor

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

func New

func New(source string, sizeRatio float64) *Processor

func (*Processor) Load

func (p *Processor) Load() (image.Image, error)

func (*Processor) SizeRatio

func (p *Processor) SizeRatio() float64

func (*Processor) Source

func (p *Processor) Source() string

func (*Processor) WithTint

func (p *Processor) WithTint(c color.Color) *Processor

Jump to

Keyboard shortcuts

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