Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Layers - Resize / Shrink Canvas to Best Fit Exported Layer Sprite #9

Closed
jjwall opened this issue Nov 30, 2022 · 0 comments
Closed
Labels
enhancement New feature or request

Comments

@jjwall
Copy link

jjwall commented Nov 30, 2022

I'm looking to use the export layers script if I can resize / shrink the canvas around each exported layer sprite to "best fit" the resultant sprite. I've played around with the script and somehow was successful in one attempt to do this, but haven't been able to recreate this result again.

For a concrete example of what I'm looking for, currently exported layer sprites use the default canvas size of the Aseprite project you're exporting from, i.e. here I'm using the Export Layers script on a 128x128px canvas and get the following output:

image

What I'm looking for is something akin to the following:

image

Notice the sizes of these png's fit the resultant layer sprites.

I thought I was able to achieve this by manipulating the script using this additional line:

app.command.CanvasSize{ ui=false, bounds=app.activeSprite.bounds } -- <---
sprite:saveCopyAs(filename)

However, I may have been leveraging an additional feature of the script unknowingly.

@jjwall jjwall added the enhancement New feature or request label Nov 30, 2022
@jjwall jjwall closed this as completed Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant