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

exporting layers with trimmed cells #6

Open
jack27121 opened this issue Aug 27, 2022 · 5 comments
Open

exporting layers with trimmed cells #6

jack27121 opened this issue Aug 27, 2022 · 5 comments

Comments

@jack27121
Copy link

it would be very useful, to be able to trim the cells when exporting each layer separately

@PKGaspi
Copy link
Owner

PKGaspi commented Aug 28, 2022

Hey, thanks for issuing about this. Can you please elaborate about what script you're referring to, the feature you're requesting and how to incorporate it to the scripts? Thank you!

@jjwall
Copy link

jjwall commented Nov 27, 2022

I believe he's referring to the export layers script. I see there is a "trim" option which I would hope trims the pixel dimensions of each png to fit the newly exported layer assets. But this isn't happening - or the trim option does something else, but the documentation doesn't mention it.

Edit: He's talking about spritesheets and the modifications made with PR #4. I'm noticing now that the trim option should not show up unless the spritesheet is selected, but it's still showing up. Also, if I select spritesheet I get this error:

image

Looks like hiding the trim option isn't being accounted for.

Edit 2: I've updated Aseprite and am no longer receiving that error.

@PKGaspi
Copy link
Owner

PKGaspi commented Nov 28, 2022

Hey! Thanks for the details. Yeah, the aseprite version is quite important so I should state somewhere in the readme what version the scripts are made for. Just to be clear, does the trim option work in the latest version? Is the issue resolved? Thanks.

@jjwall
Copy link

jjwall commented Nov 30, 2022

To be honest, I still am not sure what the trim feature is supposed to do. Perhaps you could add more detailed documentation around the "Export as spritesheet" and "Trim" features? Would be happy to QA against that documentation.

Also - not sure if this warrants a separate issue but 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. Any ideas how I might achieve this? I can provide additional details if needed.

Edit: Went ahead and added a new enhancement issue (issue #9) since I believe what I'm looking for is unrelated to this issue.

@k3ltis
Copy link

k3ltis commented May 12, 2023

Hello and thank you for the amazing script, it is time saver!

I also need to crop all the exported images by their alpha channel and wanted to share a workaround by using the commandline tool imagemagick:

convert input.png -trim +repage -gravity center -bordercolor none -border 0 output.png

Source: https://www.imagemagick.org/discourse-server/viewtopic.php?t=34916

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants