arkprocessor

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CharacterArt

type CharacterArt arkscanner.CharacterArt

type CharacterArtImage

type CharacterArtImage struct {
	Image   image.Image
	Art     *CharacterArt
	BodyNum int
	FaceNum int
}

func (*CharacterArtImage) ID

func (i *CharacterArtImage) ID() string

type PictureArt

type PictureArt arkscanner.PictureArt

type PictureArtImage

type PictureArtImage struct {
	Image image.Image
	Art   *PictureArt
}

type Processor

type Processor struct {
	Root string
}

Processor provides functionalities for processing art. The term "process" here refers to merging color channel and alpha channel of arts together, merging faces variation and bodies of character arts together, etc.

func (*Processor) ProcessCharacterArt

func (p *Processor) ProcessCharacterArt(art *CharacterArt) ([]CharacterArtImage, error)

ProcessCharacterArt process a character art.

Since picture arts are complicated, the process operation consists of:

  • Decode all relevant images, including color channel and alpha channel of faces and bodies image.
  • For each face or body, merge the alpha channels onto the color channels.
  • For each face, merge it onto its corresponding body.

func (*Processor) ProcessPictureArt

func (p *Processor) ProcessPictureArt(art *PictureArt) (*PictureArtImage, error)

ProcessPictureArt process the picture art.

Since picture arts are trivial and different from character arts, the only thing this method does is to read the art image and return it.

Jump to

Keyboard shortcuts

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