Center Image in Aseprite
A downloadable extension for Windows, macOS, and Linux
Download NowName your own price
Center Image is a micro extension for Aseprite that provides an option to move image content precisely to the center of a sprite or selection.
Extension adds
- New submenu - Edit > Center, including new options:
- Center
- Center X, with a default keyboard shortcut Alt+Shift+X
- Center Y, with a default keyboard shortcut Alt+Shift+Y
- Center (Weighted)
- Center X (Weighted), with a default keyboard shortcut Ctrl+Alt+Shift+X
- Center Y (Weighted), with a default keyboard shortcut Ctrl+Alt+Shift+Y
- For backwards compatibility, using the extension with Aseprite version lower than v1.3-rc2 will show just Center and Center (Weighted) options under the Edit menu
See also
Download
Download NowName your own price
Click download now to get access to the following files:
Center Image v2.1.0 2.8 kB
Center Image v2.0.0 2.6 kB
Center Image v1.0.0 1.8 kB
Development log
- Update v2.1.0 - Some fixes, some improvements38 days ago
- Update v2.0.0 - Weighted CenteringApr 08, 2023
Comments
Log in with itch.io to leave a comment.
Amazing extension, been using it from long time, however, after yesterday aseprite update (on steam), the extension is bugged, rather than centering the draw, it duplicate it to center, this bug happens only when you select the area, otherwise it works fine
Thanks for reporting this issue, I just released an updated version of the extension that should fix this ✌️
Downloaded and tested, works perfectly !
Thank you 💖
This looks like a tremendously useful extension! I just gave it a try on a fresh Aseprite installation, with no other extensions enabled, and am running into crashes when attempting to use any functionality.
Repro: with a few painted pixels on a single layer, selecting an area and attempting to utilize any option under Edit > Center, Aseprite immediately crashes. In other words, a base usecase.
System Details:
- MacOS 14.6
- Extension v2.0
- Aseprite v1.3.7
Asesprite debug log shows the extension loading successfully, but no debug info:
```
EXT: Loading extension '/Users/[redacted]/Library/Application Support/Aseprite/extensions/center-image/package.json'...
EXT: Extension 'center-image' loaded
BC: Load extension
- [name]=center-image
- [url]=https://thkaspar.itch.io/
- [version]=2.0.0
EXT: New keyboard shortcuts 'center-image-keys' in '/Users/[redacted]/Library/Application Support/Aseprite/extensions/center-image/./extension-keys.aseprite-keys'
EXT: New script path=/Users/[redacted]/Library/Application Support/Aseprite/extensions/center-image/./extension.lua
...
CTXT: Executing command Center
--EOF--
```
Let me know if there's a better place to submit a bug report and I can move this there so it doesn't clog your project comments, but hopefully this is helpful!
It looks like the log mentions loading the extension, I’m assuming correctly as there are no errors logged. I tested the version 2.0 of the extension on Aseprite v1.3.7 (on Windows 11) but I couldn’t reproduce the issue.
Do you experience any other crashes? Do you have any other logs that you could share? Could you try any other extension (I’m wondering if there’s some issue with script execution)?
I tried on my Windows machine and I also had no issues. Just on MacOS. I've never experienced an Aseprite crash otherwise and just tried several other extensions and they all seem fine. I don't see anything out of the ordinary in the logs and the logs terminate right when the "Center" command is issued and the program crashes. Not sure what the issue might be!
I suspect that the way the extension modified image pixels might not play well with the MacOS version. You can try the released update (v2.1.0), it might solve your problem. ✌️
Just updated to v2.1.0 and I can confirm that the extension now works on MacOS for me. Sweet!
Would be nice to have something like this except it just draws the center point.
It’s possible to draw a pixel/point and then center it, producing the same result.
I avoid adding any options that could be achieved in two or three, already available, user actions, I’m worried about overcrowding the menus with too many options. ✌️
incredible how much work this saved me. you are god's strongest soldier
It doesn't work in my Aseprite(1.3-dev)
Does it cause an error? Do the new options appear in the menu? Does clicking on the new options cause any response from the application?
No
I’m going to have to ask for more details in order to investigate this issue. Also, these extensions were not tested with unreleased versions of Aseprite built from the source.
It's a very reliable extension, but while trying to centre an already-centred image (just curious) relative to a selected area, it sometimes crashes Aseprite (I'm using beta 1.3-rc4, so the issue might stem from Aseprite itself).
Still, thanks for all the hard work you put into making these extensions, and I hope you get hired by the Aseprite team someday.
Thanks for reporting the issue, I couldn’t seem to find a scenario that would reproduce this though. Do you have any more information that I could use to try and replicate this?
Hmm, it seems to work fine now (I guess), but here are some steps that might recreate the issue:
I still think it has something to do with the beta version of Aseprite because it sometimes crashes unexpectedly.
So I tried replicating the issue by centering the image tens of times in a row with no luck, neither in the stable version nor in the beta.
Are you using some other extensions at the same time by any chance?
It was the only extension I used then, but I added a few more recently; it seems to be working fine now, though, and I haven't run into the issue for a while.
The extension is not loading in linux and if i extract it it also not works
Could you provide more information? Does it not install? What version of Aseprite are you using? What error do you get?
No problem ✌️
This made my life so much easier, thanks!
Simple and awesome ! Great job
Not really sure why, but right now the tool is just not working? I just got it into aseprite and its showing up just fine, but clicking the center button to activate it (selected area or not) just has no effect. Any conflict with magic pencil or FX? I believe those are also extensions you've made. Any ideas?
From what I tested it shouldn’t clash with any other extension.
It works only on the active cel (or all selected cels), so it could not do anything if you have an empty cel active (or a group selected, as these are not supported yet).
Perhaps a classic restart of Aseprite could help?
I gave it a try and it didn't have any effect, I might try a reinstall, but I'll let you know if I find out what the problem is
Oh my glob! I needed this so much. Thanks for creating such terrific extensions.
I love this! Thank you so much for your awesome extensions!
You’re welcome, I hope you’ll find it helpful ✌️