Ase
Aseprite file format reader/writer
Static Members
create(width: Int, height: Int, ?colorDepth: ase.types.ColorDepth = BPP32, ?initialPalette: Array<Int>): AseCreate a new Ase instance
| Name | Type | Default | Description |
|---|---|---|---|
width |
Int | File width | |
height |
Int | File height | |
colorDepth |
ase.types.ColorDepth | BPP32 |
(optional, default BPP32) color depth. BPP32, BPP16, BPP8 or INDEXED |
initialPalette |
Array<Int> | (optional) | (optional) Array of RGBA values for initial palette |
| Returns |
|---|
| Ase |
fromBytes(bytes: haxe.io.Bytes): AseCreate a new Ase instance by parsing bytes loaded from a file or network
| Name | Type | Description |
|---|---|---|
bytes |
haxe.io.Bytes | bytes to parse |
| Returns |
|---|
| Ase |
main(): VoidInstance Members
header: AseHeadercolorDepth: ase.types.ColorDepthRead-only color depth of the file
fileSize: IntFiles size in bytes
firstFrame: Framewidth: IntSprite width
height: IntSprite height
palette: PaletteInitialize the pallet
| Name | Type | Description |
|---|---|---|
colors |
Array<Int> | Array of RGBA color values for the new pallet |
Add a frame to the sprite
| Name | Type | Default | Description |
|---|---|---|---|
copyPrev |
Bool | false |
if true will copy all the cel from the previous frame |
duration |
Int | 100 |
Duration of the frame in milliseconds |
| Returns |
|---|
| Frame |
Create a new layer
| Name | Type | Default | Description |
|---|---|---|---|
name |
String | (optional) | (optional) Name for the new layer. If not specified Layer N will be used where N is the amount of currently existing layers + 1 |
visible |
Bool | true |
(optional, default true) |
editable |
Bool | true |
(optional, default true) |
| Returns |
|---|
| Ase |
toBytes(?out: haxe.io.BytesOutput): haxe.io.BytesConverts Aseprite data to binary data that can be stored to a file
| Name | Type | Default |
|---|---|---|
out |
haxe.io.BytesOutput | (optional) |
| Returns |
|---|
| haxe.io.Bytes |
toString(): String| Returns |
|---|
| String |
Private Members
createHeader(): Voidhttps://github.com/aseprite/aseprite/blob/10dda30a15a58d09e561a59594f348b4db3a4405/docs/ase-file-specs.md#old-palette-chunk-0x0004
Aseprite v1.1 saves both chunks (0x0004 and 0x2019) just for backward compatibility. Aseprite v1.3.5 writes this chunk if the palette doesn't have alpha channel and contains 256 colors or less (because this chunk is smaller), in other case the new palette chunk (0x2019) will be used (and the old one is not saved anymore).
createFirstFrame(): VoidcreateLayers(): VoidCreate layers after ase chunks are loaded
new(): VoidMetadata
| Name | Parameters |
|---|---|
:expose |
"Ase" |