image_packer

package module
v0.0.0-...-15b2169 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: MIT Imports: 7 Imported by: 0

README

== image-packer
image-packer simple CLI tool for combine / split images in different image formats.

=== Actions

.split
Split provided sprite-shit with manifest file back to stand alone image files.


=== SpriteShit Manifest

==== Custom
[source,json]
----
{
  "frames": {
    "file1.png": {
      "frame": {
        "x": 1132,
        "y": 146,
        "w": 21,
        "h": 22
      },
      "rotated": false,
      "trimmed": false,
      "spriteSourceSize": {
        "x": 0,
        "y": 0,
        "w": 21,
        "h": 22
      },
      "sourceSize": {
        "w": 21,
        "h": 22
      }
    },
    "file... n.png": {
      "frame": {
        "x": 1132,
        "y": 146,
        "w": 21,
        "h": 22
      },
      "rotated": false,
      "trimmed": false,
      "spriteSourceSize": {
        "x": 0,
        "y": 0,
        "w": 21,
        "h": 22
      },
      "sourceSize": {
        "w": 21,
        "h": 22
      }
    }
  },
  "meta": {
    "version": "1.0",
    "image": "filename.png",
    "format": "RGBA8888",
    "size": {
      "w": 1159,
      "h": 245
    },
    "scale": "1"
  }
}
----

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeImage

func DecodeImage(f *os.File) (image.Image, string, error)

func SaveImage

func SaveImage(img image.Image, t ImageSaveType, dest string) error

Types

type ImageSaveType

type ImageSaveType int
const (
	ImageTypeUnknown ImageSaveType = iota
	ImageTypePng
	ImageTypeJpeg
)

func DetectType

func DetectType(t string) ImageSaveType

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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