convert

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2018 License: BSD-3-Clause, BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeImage

func EncodeImage(img *goimage.Paletted, withPrivatePalette bool, compressed, forceTransparency bool) []byte

EncodeImage takes a paletted image and encodes it as a block.

func FromPng

func FromPng(fileName string, privatePalette bool, compressed, forceTransparency bool) []byte

FromPng reads a PNG file and encodes it as block.

func ToPng

func ToPng(fileName string, blockData []byte, palette color.Palette) (result bool)

ToPng extracts a bitmap from given block data and saves it to a file. The given palette is used should the bitmap not have a private palette.

func ToTxt

func ToTxt(fileName string, holder chunk.BlockProvider) (result bool)

ToTxt extracts all blocks from a given holder and writes

func ToWavefrontObj

func ToWavefrontObj(fileName string, blockData []byte, palette color.Palette) (result bool)

ToWavefrontObj extracts a geometry model from given block data and saves the 3D model as a Wavefront OBJ file with accompanying material file.

Types

type Text

type Text struct {
	Entries []TextEntry `xml:"Entry"`
}

type TextEntry

type TextEntry struct {
	Block *int   `xml:"block,attr,omitempty"`
	CData string `xml:",cdata"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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