gfx

package
v0.0.0-...-3d83ec4 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: GPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeTilemap

func AnalyzeTilemap(mode uint8, isCpcPlus bool, filename, picturePath string, in image.Image, cfg *config.MartineConfig, criteria common.AnalyseTilemapOption) error

nolint: funlen, gocognit

func ApplyImages

func ApplyImages(
	in []*image.NRGBA,
	cfg *config.MartineConfig,
	mode int,
	palette color.Palette,
	screenMode uint8,
) ([][]byte, []*image.NRGBA, color.Palette, error)

func ApplyOneImage

func ApplyOneImage(in image.Image,
	cfg *config.MartineConfig,
	mode int,
	palette color.Palette,
	screenMode uint8,
) ([]byte, *image.NRGBA, color.Palette, int, error)

nolint: funlen, gocognit

func ApplyOneImageAndExport

func ApplyOneImageAndExport(in image.Image,
	cfg *config.MartineConfig,
	filename, picturePath string,
	mode int,
	screenMode uint8,
) error

nolint:funlen, gocognit

func DoDithering

func DoDithering(in *image.NRGBA,
	p color.Palette,
	ditheringAlgo int,
	ditheringType constants.DitheringType,
	ditheringWithQuantification bool,
	ditheringMatrix [][]float32,
	ditheringMultiplier float32,
	isCpcPlus bool,
	size constants.Size,
) (*image.NRGBA, color.Palette)

func DoTransformation

func DoTransformation(in *image.NRGBA,
	p color.Palette,
	screenMode uint8,
	rollMode,
	rotationMode,
	rotation3DMode bool,
	rotationRlaBit,
	rotationSlaBit,
	rotationRraBit,
	rotationSraBit,
	rotationKeephighBit,
	rotationLosthighBit,
	rotationKeeplowBit,
	rotationLostlowBit,
	rotationIterations,
	rollIterations int,
	rotation3DX0,
	rotation3DY0,
	rotation3DType int,
	resizingAlgo imaging.ResampleFilter,
	size constants.Size,
) ([]*image.NRGBA, error)

func ExportImpdrawTilemap

func ExportImpdrawTilemap(analyze *transformation.AnalyzeBoard, filename string, palette color.Palette, mode uint8, size constants.Size, in image.Image, cfg *config.MartineConfig) (err error)

nolint: funlen, gocognit

func ExportRawImage

func ExportRawImage(in image.Image,
	palette color.Palette,
	cfg *config.MartineConfig,
	filename, picturePath string,
	screenMode uint8) error

func ExportTilemap

func ExportTilemap(analyze *transformation.AnalyzeBoard, filename string, palette color.Palette, mode uint8, in image.Image, flatExport bool, cfg *config.MartineConfig) (err error)

nolint: funlen

func ExportTilemapClassical

func ExportTilemapClassical(m image.Image, filename string, board *transformation.AnalyzeBoard, size constants.Size, cfg *config.MartineConfig) error

func InternalTransform

func InternalTransform(
	in *image.NRGBA,
	p color.Palette,
	size constants.Size,
	cfg *config.MartineConfig) []byte

func Tilemap

func Tilemap(mode uint8, filename, picturePath string, size constants.Size, in image.Image, cfg *config.MartineConfig) error

nolint: funlen, gocognit

func TilemapClassical

func TilemapClassical(mode uint8, isCpcPlus bool, filename, picturePath string, in image.Image, size constants.Size, cfg *config.MartineConfig) (*transformation.AnalyzeBoard, [][]image.Image, color.Palette)

func TilemapRaw

func TilemapRaw(mode uint8, isCpcPlus bool, size constants.Size, in image.Image, cfg *config.MartineConfig) (*transformation.AnalyzeBoard, [][]image.Image, color.Palette, error)

nolint: funlen

func Transform

func Transform(in *image.NRGBA,
	p color.Palette,
	size constants.Size,
	filepath string,
	cfg *config.MartineConfig) error

func TransformRawCpcData

func TransformRawCpcData(data, palette []int, width, height int, mode int, isPlus bool) (*image.NRGBA, error)

nolint: funlen, gocognit

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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