Converting greyscale pictures
Moderator: MaxCoderz Staff
Converting greyscale pictures
Does anyone know of a simple command line tool that converts greyscale images (BMP, or whatever) to two layers of data (preferably .db statements)? Nothing funky like that iStudio or graphics studio or whatever it's called, I just want to give it a filename as a command line parameter and have it spit out the bytes, either in a file or back to the console.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
Hmm, I'm currently fighting with GCP, but it doesn't want to open my pictures... Ah, I can't use lower case characters in my filenames, just brilliant... and the "a" switch to disable the bugged adjust screen still flashes the adjust screen which makes my DOS box go fullscreen and black...
EarlyMorning is going to support this, but all my pictures are different sizes, so I'd have to make a new spritesheet for each picture, and I wasn't able to load/copy'n'paste my pictures into it, so I'd have to redraw them. EarlyMorning is very good for RPG development, but a bit over the top for my goals. I just want to include a directory full of images, without having to redraw them to two seperate layer images all the time.
Anyway, I could use either of these options, but none really satisfy me... Maybe I'll write my own tool.
EarlyMorning is going to support this, but all my pictures are different sizes, so I'd have to make a new spritesheet for each picture, and I wasn't able to load/copy'n'paste my pictures into it, so I'd have to redraw them. EarlyMorning is very good for RPG development, but a bit over the top for my goals. I just want to include a directory full of images, without having to redraw them to two seperate layer images all the time.
Anyway, I could use either of these options, but none really satisfy me... Maybe I'll write my own tool.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
I wanted to write a proper tool to scan my program source for specific includes and add the two layer bitmap data there, but I was lazy . I wrote a quick and dirty PHP script that goes through a directory with 256 color bitmaps and for each bitmap it goes through the data twice with str_replace to create two new bitmaps; one with lightgrey>black and darkgrey>white and one with lightgrey>white and darkgrey>black.
I added a call to this script to my Latenite build script for this project, so now when I press F5 in Latenite all my greyscale images get converted to two layer images which Brass then includes before PTI runs my program to show the pretty new imagery
Now THAT's a proper debug cycle
If you want to do the same, unzip this to your Latenite/Templates/Projects folder:
http://timendus.student.utwente.nl/docs ... mplate.zip
!! Warning: Requires that you have a PHP interpreter properly installed on your computer, and hasn't been tested with bitmap images that weren't generated with MS Paint. In short: it sucks. But it works like a charm
I added a call to this script to my Latenite build script for this project, so now when I press F5 in Latenite all my greyscale images get converted to two layer images which Brass then includes before PTI runs my program to show the pretty new imagery
Now THAT's a proper debug cycle
If you want to do the same, unzip this to your Latenite/Templates/Projects folder:
http://timendus.student.utwente.nl/docs ... mplate.zip
!! Warning: Requires that you have a PHP interpreter properly installed on your computer, and hasn't been tested with bitmap images that weren't generated with MS Paint. In short: it sucks. But it works like a charm
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
Posted: Sun 5-3-2006 14:48
Posted: Sun 5-3-2006 16:47
Less than two hours appearantly ;)
Posted: Sun 5-3-2006 16:47
Less than two hours appearantly ;)
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS