CodeWalrus

Featured Member Projects => Completed and Inactive Projects => [Inactive] KnightOS (TI-73/83+/84+/CSE) => Topic started by: Max Leiter on October 13, 2015, 06:49:20 AM

Title: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: Max Leiter on October 13, 2015, 06:49:20 AM
KIMP = KnightOS image manipulation program
I'm new to assembly (and anything calculator related) and decided to try and make a sprite editor for KnightOS. Eventually, it will support KnightOS's image format (and will also require me implementing 'kimg' support into the kernel d: ).

The source code is currently available here: https://github.com/maxleiter/kimp and any suggestions/comments/anything is appreciated.

Here's a quick screenshot
(https://sr.ht/KkJs.png)


EDIT: Updated image with centered grid
Title: Re: KIMG - a (huge) WIP image/sprite editor for KnightOS
Post by: Dream of Omnimaga on October 13, 2015, 07:19:41 AM
Looks good so far. Glad that you got into calculator development. :)

My suggestions would be to move the sprite on the side and the menu further, so that when the menu is open, then we still see the sprite.
Title: Re: KIMG - a (huge) WIP image/sprite editor for KnightOS
Post by: novenary on October 13, 2015, 07:53:59 AM
The menu is part of the KnightOS UI. The sprite grid seems to be off center though.
Title: Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: Max Leiter on October 13, 2015, 08:01:55 PM
Centered the grid, looks a lot better. As streetwalrus said, I can't move the 'menu' atm.

(https://sr.ht/KkJs.png)

For some reason the menu causes the kernel to crash if opened twice, and doesn't really work.
Title: Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: Dream of Omnimaga on October 14, 2015, 02:05:00 AM
Sorry to hear about the crashes. Can you post the source in case people can help?
Title: Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: Ivoah on October 14, 2015, 02:06:21 AM
Quote from: DJ Omnimaga on October 14, 2015, 02:05:00 AM
Sorry to hear about the crashes. Can you post the source in case people can help?

He already gave a link to the source

Quote from: Max Leiter on October 13, 2015, 06:49:20 AM
The source code is currently available here: https://github.com/maxleiter/kimp and any suggestions/comments/anything is appreciated.
Title: Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: aetios on October 14, 2015, 05:29:50 AM
Hey, that's cool! Regarding the kernel crashes that could very well be related to KOS itself, as it's still a huge WIP in itself ;)
Title: Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: Max Leiter on October 14, 2015, 05:30:42 AM
Quote from: aeTIos on October 14, 2015, 05:29:50 AM
Hey, that's cool! Regarding the kernel crashes that could very well be related to KOS itself, as it's still a huge WIP in itself ;)
The issue is definitely KIMP, as the same menu system is implemented in multiple other KOS apps (fileman, castle, etc)
Title: Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: aetios on October 14, 2015, 05:31:50 AM
Quote from: Max Leiter on October 14, 2015, 05:30:42 AM
Quote from: aeTIos on October 14, 2015, 05:29:50 AM
Hey, that's cool! Regarding the kernel crashes that could very well be related to KOS itself, as it's still a huge WIP in itself ;)
The issue is definitely KIMP, as the same menu system is implemented in multiple other KOS apps (fileman, castle, etc)
If you can't figure it out, maybe ask SirCmpwn? (or anyone else in the KOS IRC channel)
Title: Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: Max Leiter on October 14, 2015, 05:35:19 AM
Quote from: aeTIos on October 14, 2015, 05:31:50 AM
Quote from: Max Leiter on October 14, 2015, 05:30:42 AM
Quote from: aeTIos on October 14, 2015, 05:29:50 AM
Hey, that's cool! Regarding the kernel crashes that could very well be related to KOS itself, as it's still a huge WIP in itself ;)
The issue is definitely KIMP, as the same menu system is implemented in multiple other KOS apps (fileman, castle, etc)
If you can't figure it out, maybe ask SirCmpwn? (or anyone else in the KOS IRC channel)
I've asked multiple times lol, SirCmpwn didn't know (or didn't read it) and Ivoah said he'll help me look into it tomorrow. Other than that it seems like a weird bug. I've tried implementing it in 3 ways, once my own, once basically copied/pasted from Fileman, and one copied/pasted from Calcsys. All of them had basically the same issue, so I think the actual issue may be in another function

EDIT: Ivoah said he took a quick look over it today and didn't see anything wrong with it
EDIT 2: Mostly fixed, the issue was an extra pcall(flushKeys), https://github.com/MaxLeiter/KIMP/commit/fed46d979777c1cedfbb7f697a53a7ce4be7e0d3
Title: Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: Max Leiter on October 15, 2015, 06:01:19 AM
Added a basic cursor, doesn't really like to work yet...
(https://sr.ht/DNzz.png)

Any suggestions as to how to auto-generate the grid/cursor positions welcome, I have no idea as to how to go about doing it (i. e. input size, generate table)
Title: Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: Max Leiter on October 17, 2015, 03:13:00 AM
Got the cursor to be functional, now to implement actual drawing :)
(http://i.imgur.com/t0T8kUf.gif)
Title: Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: Dream of Omnimaga on October 17, 2015, 04:10:26 AM
Good to hear. Also what software do you use to make screenshots by the way? I use CamStudio then VirtualDub, but I was curious if any other software could produce smaller GIF file sizes.


Also can your image editor edit grayscale sprites?
Title: Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: Max Leiter on October 17, 2015, 04:20:09 AM
At the moment it has no saving, loading, or editing lol, but the idea is to support kimg (KnightOS's format), grayscale png, and whatever else there is in the calculator community.

I use ffmpeg with x11grab to record. The gif was made with imgur's video-to-gif thing (http://'http://imgur.com/vidgif').

Title: Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: Dream of Omnimaga on October 17, 2015, 04:37:23 AM
If you support other formats than KOS, then Axe sprites (hexadecimal data) should probably be supported as well, since Axe is still used sometimes. You would just have to give the hexadecimal of the sprite data to the user so he can write it down. Of course, it's more for people who own two calculators  or an emulator, but it could still be handy.

And I see. Thanks for the info about your video capture setup.
Title: Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
Post by: SirCmpwn on October 18, 2015, 09:29:30 PM
Quote from: Max Leiter on October 17, 2015, 04:20:09 AM
At the moment it has no saving, loading, or editing lol, but the idea is to support kimg (KnightOS's format), grayscale png, and whatever else there is in the calculator community.

The KIMG specification supports monochrome, greyscale, and color images. There's discussion on how the image format should work here (https://github.com/KnightOS/kernel/issues/52), and I think it was finalized here (http://www.knightos.org/documentation/kimg). I think that it would be best to implement KIMG as a userspace library, at this point.