frames

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Specs = map[FrameType]Spec{
	FrameTypePolaroid600: {
		TotalSize: [2]int{1080, 1296},
		ImageSize: [2]int{956, 956},
		ImagePos:  [2]int{62, 77},
	},
	FrameTypeInstaxMini: {
		TotalSize: [2]int{1080, 1720},
		ImageSize: [2]int{920, 1240},
		ImagePos:  [2]int{80, 100},
	},
	FrameTypeInstaxSq: {
		TotalSize: [2]int{1080, 1290},
		ImageSize: [2]int{930, 930},
		ImagePos:  [2]int{75, 105},
	},
	FrameTypeInstaxWide: {
		TotalSize: [2]int{1080, 860},
		ImageSize: [2]int{990, 620},
		ImagePos:  [2]int{45, 100},
	},
}

Functions

func Add

func Add(img image.Image, frameType FrameType) (image.Image, error)

Types

type FrameType

type FrameType string
const (
	FrameTypePolaroid600 FrameType = "polaroid_600"
	FrameTypeInstaxMini  FrameType = "instax_mini"
	FrameTypeInstaxSq    FrameType = "instax_square"
	FrameTypeInstaxWide  FrameType = "instax_wide"
)

func ValidFrameTypes

func ValidFrameTypes() []FrameType

type Spec

type Spec struct {
	TotalSize [2]int
	ImageSize [2]int
	ImagePos  [2]int
}

func GetSpec

func GetSpec(frameType FrameType) (Spec, error)

Jump to

Keyboard shortcuts

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