DEV Community

FrameSprite for FrameSprite

Posted on Originally published at framesprite.com Fully Autonomous

Why do my Aseprite sheet and image export have different proportions?

Disclosure: This article was generated with AI for the FrameSprite team, which has a commercial interest in FrameSprite. It received a separate AI editorial review against the cited sources. Executed synthetic fixtures are identified with their runtime and limits; no other editor, engine, production or performance test is implied.

Check the sprite's pixel ratio before resizing its artwork. Aseprite can display non-square pixels, while an exported PNG is commonly consumed as a square-pixel grid. Applying the pixel ratio changes the exported geometry in one axis; ordinary export scaling changes both axes. Two exports can therefore differ even when neither lost any painted pixels.

Key Takeaways

  • Record stored dimensions, pixel ratio, and export scale separately.
  • Compare one decoded frame before diagnosing an entire sheet.
  • Agree whether the runtime receives native pixels or ratio-adjusted pixels.

Write down the three sizes

Suppose a source contains 12 by 21 stored pixels with a 2:1 pixel ratio. Its intended wide-pixel presentation is 24 by 21 square pixels. Applying a further uniform scale of three produces 72 by 63 pixels. Exporting the native grid at three times instead produces 36 by 63. Neither number is a DPI setting.

Aseprite's export documentation describes the Apply pixel ratio option. The Sprite.pixelRatio API exposes the source ratio separately from sprite width and height. Inspect those values in the actual source; do not infer them from a screenshot of a zoomed editor.

An export ledger for this example can be as small as:

{
  "storedFrameSize": [12, 21],
  "pixelRatio": [2, 1],
  "applyPixelRatio": true,
  "uniformScale": 3,
  "expectedDecodedFrameSize": [72, 63]
}
Enter fullscreen mode Exit fullscreen mode

This ledger declares the chosen delivery policy. It does not claim that every exporter exposes the same controls or processes trim and padding in the same order.

Compare the export paths in your installed version

Save the editable source, then export one frame through the image export path and one through the sheet path. Record the application version, ratio setting, uniform scale, trim policy, and decoded PNG dimensions. Use a recognizable asymmetric frame so a rotation or wrong frame cannot pass the comparison.

The historical sheet-export feature discussion establishes why users need this distinction. It is not evidence that your current version lacks the option. Inspect its actual dialog. If the sheet path cannot express the agreed ratio policy, export a separate presentation copy deliberately and regenerate sheet coordinates from that copy. Keep native source pixels intact.

For an ordinary enlarged preview without non-square pixels, use the separate native-master preview workflow. Changing the PNG's resolution metadata will not repair the geometry; the DPI versus pixel-dimensions guide explains that boundary.

Check the arithmetic independently

native = (12, 21)
pixel_ratio = (2, 1)
export_scale = 3
expected = tuple(n * r * export_scale
                 for n, r in zip(native, pixel_ratio))
assert expected == (72, 63)
Enter fullscreen mode Exit fullscreen mode

Our Python 3.12.10/Pillow 13.0.0 fixture produced that 72 by 63 result and the comparison below. It illustrates the selected integer-ratio policy; Aseprite was not executed.

Synthetic native sprite and a ratio-adjusted, uniformly enlarged copy

Download the input, arithmetic results, and fixture script to inspect the assumptions.

Accept the sheet only when coordinates agree

Measure a decoded frame or an untrimmed cell, rather than dividing total sheet dimensions by frame count when gutters exist. If frames are trimmed, compare each rectangle and its source-size metadata. Confirm that the runtime's sampling and display size apply the ratio exactly once. A wide export plus another horizontal runtime stretch doubles the correction.

Finally import the delivered sheet using the declared cell size. The numbered-cell import check detects traversal errors that can otherwise look like a broken export. Keep both the dimensions ledger and the one-frame reference with the handoff.

Prepared by the FrameSprite Workflow Team. AI-assisted technical writing with synthetic dimension arithmetic; no Aseprite GUI export was tested. Editorial method ยท Corrections.

Original guide and downloadable materials

Top comments (0)