# File formats

Which formats pxstud.io opens and exports, and what each one keeps.

Open files with File > Open... (or drop them on the editor) and export with File > Export....
How to use each option is in [Opening, importing and exporting](https://pxstud.io/docs/manual/guides/import-export.md).

| Format | Opens | Exports | Animation | Layers |
| - | - | - | - | - |
| **pxstud.io** (`.pxstudio`) | yes | with File > Save As... | yes | everything is kept |
| **Aseprite** (`.aseprite`, `.ase`) | yes | yes | yes | layers, groups, linked cels, tags, slices, tilemaps and the palette |
| **PNG** | one image | one image, or one per frame | as separate files | flattened |
| **APNG** (animated PNG, `.png` or `.apng`) | yes, with each frame's timing | animated | yes | flattened |
| **GIF** | yes, with each frame's timing | animated | yes | flattened |
| **WebP** | still or animated | still or animated | yes | flattened |
| **JPEG** | yes (no transparency) | one image per frame | no | flattened |
| **AVIF** | one image | one image per frame (lossless by default) | no | flattened |
| **BMP**, **TGA**, **PCX** | one image | one image per frame | no | flattened |
| **QOI** | one image | one image per frame | no | flattened |
| **ICO** (Windows icon) | the largest image in the file | one icon per frame, up to 256×256, optionally with every larger whole-number size | no | flattened |
| **CUR** (Windows cursor) | the largest image, with its click point | like ICO, with the click point | no | flattened |
| **Netpbm** (`.pbm`, `.pgm`, `.ppm`, `.pnm`, `.pam`) | one image | one image per frame (`.pgm`, `.ppm`, or `.pam` with transparency) | no | flattened |
| **Photoshop** (`.psd`, `.psb`) | yes | the active frame | no | layers, groups, blend modes, opacity, visibility, clipping |
| **OpenRaster** (`.ora`) | yes | the active frame | no | layers, groups, blend modes, opacity, visibility |
| **Piskel** (`.piskel`) | yes | yes | yes | layers (groups flattened on export) |
| **Pixilart** (`.pixil`) | yes | no | yes | layers |
| **Pixelorama** (`.pxo`, version 1.0 and later) | yes | no | yes, with tags | layers, groups, tilemaps, linked cels |
| **Pyxel Edit** (`.pyxel`) | yes | no | animations become frames and tags | layers |
| **FLI/FLC** (Autodesk Animator) | yes | yes | yes | flattened, up to 256 colors |
| **SVG** | through Import as pixel art | one image per frame | no | flattened |
| **MP4 video** | no | where the browser can make video | yes | flattened |
| **Sprite sheet** (PNG + JSON) | with File > Import > Sprite sheet... | yes | frames in one image | can split layers and tags into rows |
| **Godot 4 SpriteFrames** (PNG + `.tres`) | no | yes, as a sprite sheet's data file | one animation per tag | can split layers |
| **Tilemap** (Tiled `.tmj`/`.tsj`, JSON) | no | yes | JSON: every frame; Tiled: one frame | tilemap layers only |
| **Palettes** (`.gpl`, `.pal`, `.hex`, `.act`, `.aco`, `.ase`, …) | in the [Palette Library](https://pxstud.io/docs/manual/guides/color.md#the-palette-library) | in the Palette Library | | |

**Size limits.** Animated formats and Aseprite files open up to 4096 pixels on a side.

**Opening images.** An image opens as a sprite with one layer. Indexed images (GIF, FLC, 8-bit PNG,
BMP, TGA, PCX, ICO, indexed Photoshop files) open as indexed sprites with their palette (an 8-bit
PNG's partly transparent colors included); grayscale
images (PGM, PBM, gray PNG, gray Photoshop files) open as grayscale sprites; a GIF whose frames have different
palettes keeps a palette per frame. A PNG that is animated (an APNG) opens with all its frames and
their timings, whether it's named `.png` or `.apng`.

**Files from other editors.** Photoshop, OpenRaster (Krita, GIMP, MyPaint), Piskel, Pixilart,
Pixelorama and Pyxel Edit files open with their layers. Anything that doesn't carry over is listed
in a notice:

- A blend mode pxstud.io doesn't have becomes Normal.
- Photoshop's Pass Through groups open as pass-through groups and its other groups as isolated
  ones, and export the same way. A Pass Through group below 100% opacity can only be drawn
  isolated: when a layer inside uses another blend mode, the notice says it may look different.
- OpenRaster groups keep their isolation (`isolation="isolate"` is an isolated group). In
  Pixelorama, a group set to Pass Through opens pass-through and any other group isolated.
- Photoshop layer masks are applied to the layer's pixels. Adjustment layers, text and effects
  come in as their pixels, or not at all.
- Pixelorama tilemap layers open as tilemap layers: layers that share a tileset still share it,
  and flipped and transposed tiles keep their transform. A tilemap with isometric, hexagonal or
  half-offset tiles, or one the square tile grid can't hold, opens as an ordinary layer of its
  pixels. An indexed Pixelorama project opens as an indexed sprite, with its palette's colors in
  the same slots; if the file's indices and colors don't agree it opens as RGBA. Linked cels stay
  linked, and guides and user data (project, layer, cel, tag and tile notes, layer and cel
  colors) come along.
- Pixelorama's layer effects, 3D and audio layers and frame user data are skipped (the notice names
  the layers). Files from before Pixelorama 1.0 need saving again in a newer Pixelorama.
- A Pyxel Edit file with animations opens at tile size, with one frame per animation cell and a
  tag per animation; the rest of the canvas isn't kept.
- Piskel keeps one frame rate for the whole file, so on export it uses the most common frame
  duration. Its export also leaves out hidden layers and has no groups or blend modes.

**Icons and cursors.** An ICO or CUR file holds one image per size; pxstud.io opens the largest. A
cursor's click point (its hotspot) comes in as a slice named `Hotspot` with its pivot on that
pixel. Exporting a cursor uses the pivot of a slice named `hotspot`, or the top-left pixel when
there is none.

**FLC timing.** FLC players show every frame for the same time, so pxstud.io's FLC export repeats a
frame as many times as its duration needs (as Aseprite does), and opening an FLC joins repeated
frames back into one. Two neighboring frames that look the same become one frame either way.

**APNG or GIF?** An animated PNG keeps every color, soft transparency and exact frame timings,
and plays in every current browser. GIF has at most 256 colors, only fully clear or fully solid
pixels, and timings in 10 ms steps, but almost everything can show it. Apps without APNG support
show an animated PNG's first frame.

**Aseprite files** keep almost everything. When opening one, a notice lists what couldn't be kept:
an embedded color profile (pxstud.io works in sRGB), a blend mode pxstud.io doesn't have (set to
Normal), a tilemap layer that isn't on its tile grid (opened as an image layer), a reference
layer that shows different images on different frames (the first is kept), or a damaged cel or
an unknown kind of layer (left out, as Aseprite does, while the rest of the file opens).

Aseprite has no clipping masks. pxstud.io saves a layer's clipping mask in the `.aseprite` file as
a property under its own `pxstudio` extension name, which Aseprite keeps but ignores. The layer
draws unclipped in Aseprite and is clipped again when the file is reopened in pxstud.io.

Aseprite isolates either every group or none: groups are pass-through unless **Compose groups
separately** (in its Experimental preferences) is on. When a sprite has an isolated group, pxstud.io's `.aseprite` file
asks for composed groups (and keeps the groups' opacity and blend modes), and marks each group
that isn't isolated with `isolated: false` under the `pxstudio` extension name. Aseprite then
draws those groups isolated too when that option is on, while pxstud.io reopens them
pass-through. A file with composed groups from Aseprite opens with every group isolated.
