Sonlen wrote:
You should add a function for a bitmap image to be converted, and then a "selection window" like a sort of cropping tool for the size of the pic on a calc, then it makes that into a picture based on the user decided area.
That's something that I actually overlooked. Good call on that, that should definitely be in there.

Sonlen wrote:
And just for the heck of it, take that pic and turn it into hex, I have thoughts of doing that for FFME, but a Pic is huge, and it would take forever.
Given what I already have implemented, that's easy enough to do, so I'll go ahead and throw that in there. I'll also add a feature to insert a hex sprite, so that you can click on the screen, it'll prompt you for some hex, and then it'll put it in there.

I've worked on it some more, here's what I've got. These are just some of the shapes that you'll be able to add. There will also be the ability to toggle a grid and set the size (so the grid can be every 8x8 pixels, etc.):

There is also undo/redo.
You, my good sir, may have an epic winsauce of deliciousness for that. Very nice work! I think your program is going to quickly eclipse a whole host of existing, separate, and inferior alternatives. Wink
KermMartian wrote:
Very nice work! I think your program is going to quickly eclipse a whole host of existing, separate, and inferior alternatives. Wink
Thanks Smile That's the goal, in fact. Of course, this won't replace something like Paint.NET or Gimp, or whatever people do for their pixel art, but it should work as a nice quick-fix for pixtures, and a way to convert the bmps you have into images pretty easily.

I could also have the program spit out a list of hex strings, each corresponding to some NxM region of the image. That way you can make all your sprites, load them up in this, and then export them all the hex.

For now I'm just having fun adding shapes. I just discovered the GraphicsPath object, so I might even add the ability for users to define a shape, though I'm not sure how helpful that will be.
Alright, importing and saving is now working. When you go to import a picture it brings up this crop window:

The black rectangle is what you're selecting to be the picture. It does a simple algorithm to turn in to black and white, and gives you this:

I might do an edge detection thing instead of just is this pixel color average closer to black or white, but that's what it does.

And then you can save it!

This obviously shouldn't be used to replace your current image editor, as I'm not in the business of reinventing the wheel, but it is a nice way to open and quickly convert/edit existing image.
merthsoft wrote:
Alright, importing and saving is now working. When you go to import a picture it brings up this crop window:
The black rectangle is what you're selecting to be the picture. It does a simple algorithm to turn in to black and white, and gives you this:
I might do an edge detection thing instead of just is this pixel color average closer to black or white, but that's what it does.

And then you can save it!
This obviously shouldn't be used to replace your current image editor, as I'm not in the business of reinventing the wheel, but it is a nice way to open and quickly convert/edit existing image.


Holy Crap, that is perfect, now just to get that for a "Beta Test". :p
Alright, another update! Now you can export the image to hex, either in one giant string, or broken up as you see fit. It doesn't do the best error detection, so don't go crazy. 8x8 and 16x16 are built in, the rest you have to go into a custom menu. It's not terribly intuitive, but it works. Here are some screenies:




And, by popular demand, here is a download:
http://merthsoft.com/Tokens.zip

Hope it isn't too crashy, though I guarantee nothing.
This project is looking really good, Shaun, great work! Smile Have you any plans to make the image tool friendly toward assembly programmers too?
benryves wrote:
This project is looking really good, Shaun, great work! Smile Have you any plans to make the image tool friendly toward assembly programmers too?
Thanks, Ben! I've certainly thought about it, for both the image editor and the DCS GUI editor. When i first thought up this project (early college), I was still pretty much a BASIC-only coder, and it was around when Celtic was released, so I mostly wanted to library functionality. But now when I do stuff for the calculator, I do it in assembly, so it's likely that I adapt some of these tools over, it certainly wouldn't be too complicated.
merthsoft wrote:

And then you can save it!

This obviously shouldn't be used to replace your current image editor, as I'm not in the business of reinventing the wheel, but it is a nice way to open and quickly convert/edit existing image.

Someone please make a game involving this image for my calculator. Bonus cookies for a chomping animation.
Ben and Shaun, I definitely hope he does make something assembly-centric for it, if only .db statement exporting and PushGUIStack / .db / .dw statements for DCS GUIs. I think a computer-side tool to design DCS GUIs would be just as useful to ASM programmers as to BASIC programmers
Might I make a request for a zoom feature for the importing an image if you don't have that working on yet?
Sure. How would you want that to work? Like, zoom in/out on the image and the rectangle stays the same? So if the image is too big to fit in the bounds, you can shrink it down so that it does. Or should the rectangle get bigger/smaller with the zooming?
merthsoft wrote:
Sure. How would you want that to work? Like, zoom in/out on the image and the rectangle stays the same? So if the image is too big to fit in the bounds, you can shrink it down so that it does. Or should the rectangle get bigger/smaller with the zooming?


When you are cropping so if you are trying to fit it in lets say by the pixel, it is easier to get it perfect.
Also, if the rectangle for cropping is outside the image, it is defaulted to black, can you make it so you choose if it is black or white?
Ok, I can do that. I think I'll work on that and getting some ASM-style exports and release another build in the next couple of days.
merthsoft wrote:
Ok, I can do that. I think I'll work on that and getting some ASM-style exports and release another build in the next couple of days.

I wish you lots of luck and I am looking forward to how this is going to end up when you are finished.
merthsoft wrote:
Ok, I can do that. I think I'll work on that and getting some ASM-style exports and release another build in the next couple of days.
Woohoo, I'm certainly looking forward to that. On the ASM/GUI end, I hope having one or two of the GUI elements in place will make adding the other ones a bit easier.
It's pretty easy to add the objects. I'd like to make it a little more extensible, maybe have the GUI objects defined in XML or something so that it's easy to add more, but for now it'll just be hard coded.
merthsoft wrote:
It's pretty easy to add the objects. I'd like to make it a little more extensible, maybe have the GUI objects defined in XML or something so that it's easy to add more, but for now it'll just be hard coded.
Yeah, I hear that, but I don't see Doors CS gaining a giant set of new GUI functions in the near future. I guess if you wanted to make it extensible for other GUIs the XML thing would be a great idea, but I don't know too many other calculator GUI APIs. Smile
So, getting it to export in binary was pretty trivial, here're the xlib sprites:

And here's the dino picture:

Looks like dinos to me!

I suppose the right thing to do now would be to make the sprite editor able to do both hex and binary. I'll also be looking over some of the code Ben sent me to see how easy it would be to make this work with BBC BASIC as well. Ideally, this'll be able to do all languages. For ASM it'll just do the letters and numbers and stuff. I'd like to find out how Mimas saves its files. There will also, of course, be a way to save it in plain text. Also also, hopefully one of these days Kerm and I will be able to get an SC API hammered out so that this can interface directly with SC.
Ah yes, I also hope we can hammer out an SC API. We'll have to do something about authentication; I think we might be able to steal some of the work Elfprince13 and I did to make Freebuild users authenticate themselves to Cemetech.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3, 4, 5, 6 ... 30, 31, 32  Next
» View previous topic :: View next topic  
Page 5 of 32
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement