16 color .xpm image viewer from SD
Oldbitcollector (Jeff)
Posts: 8,091
Having had my fill of text-based applications, I thought I'd turn my attention to something new..
Potatoview (named after Doug's high-color driver I borrowed for this..)
This viewer will display 16 color .XPM (X Pixmap) graphics. (GIMP will do these) at 160x96
(I discovered that I could get the character=color to stay consistent if I included a small
pixel bar using all colors are the top of the graphic before converting to .xpm.)
A few images are included in the zip, just change the filename in spin and recompile.
The images need to be copied to SD before running, as they will be read with fsrw.
As soon as I get my head around a more intelligent graphics format, I'll move to 64 color next. [noparse]:)[/noparse]
rename to .zip extension
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
A Living Propeller FAQ - The Propeller Wiki
(Got the Knowledge? Got a Moment? Add something today!)
Post Edited (Oldbitcollector) : 3/22/2008 2:05:15 AM GMT
Potatoview (named after Doug's high-color driver I borrowed for this..)
This viewer will display 16 color .XPM (X Pixmap) graphics. (GIMP will do these) at 160x96
(I discovered that I could get the character=color to stay consistent if I included a small
pixel bar using all colors are the top of the graphic before converting to .xpm.)
A few images are included in the zip, just change the filename in spin and recompile.
The images need to be copied to SD before running, as they will be read with fsrw.
As soon as I get my head around a more intelligent graphics format, I'll move to 64 color next. [noparse]:)[/noparse]
rename to .zip extension
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
A Living Propeller FAQ - The Propeller Wiki
(Got the Knowledge? Got a Moment? Add something today!)
Post Edited (Oldbitcollector) : 3/22/2008 2:05:15 AM GMT
Comments
Actually, I guess it says 125 colors from 8-bits (for some reason I don't see).
I peeked at your code. I think porting this to work on the uOLED-96-PROP is an option, especially with the 8-bit per pixel routines I posted. Of course, the display size is only 96 pixels by 64 pixels.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter
www.brilldea.com·- check out the uOLED-IOC, an I/O expansion for the uOLED-96-PROP
www.tdswieter.com
One little spark of imagination is all it takes for an idea to explode
(In otherwords an X might be red in one picture or blue in another)
so you have to write an RGB-to-color table to properly read and set the colors.
I discovered that if I placed a simple 16 color pixel line at the top of the graphics,
then the .XPM character-to-color conversion would stay stable, as it seems assignments
are first come-first serve. And the RGB table conversion was really tossing me under
a table, so in the case, I just skip past it.
If someone wants to play with this, or better yet improve on the idea... <grin>
I'll attach the 16 color pixel line bar to this post.
The images were cranked down the size, pixel bar placed, and saved as
16-color bitmap in mspaint. Then I used windows-GIMP to convert them to .xpm.
OBC
my graphic is sooo small the forum thinks it's nothing!
download the pixbar file and rename with .zip extension.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
A Living Propeller FAQ - The Propeller Wiki
(Got the Knowledge? Got a Moment? Add something today!)
Post Edited (Oldbitcollector) : 3/22/2008 1:56:26 AM GMT
No worries about having to name it potatoview. I put the code out there for people to futz with. Was just checking out color, that's all. Name it what you want to name it! Of course, potatoview might get you some, "what the hell?" downloads [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
else being called propTHIS and spinTHAT we were due for a change. <smirk>
Actually when I do a version of this to run from PropDOS, I'll have to
shorten it to spudview....
OBC
Edit
Anyone know how to create a 64 color bitmap? Paint only does 256 and 16
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
A Living Propeller FAQ - The Propeller Wiki
(Got the Knowledge? Got a Moment? Add something today!)
Post Edited (Oldbitcollector) : 3/22/2008 3:51:54 PM GMT
The try-buy version runs for a while. Long enough to have a good play with your code. I bought one years ago and still run it regularly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
I suspect I'll have to sit down next and actually write a hex code converter.
I'll start with 32 colors and go from there.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
A Living Propeller FAQ - The Propeller Wiki
(Got the Knowledge? Got a Moment? Add something today!)
Not sure which hex code and which color!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Post Edited (potatohead) : 3/23/2008 2:20:41 AM GMT
This viewer is (unfinished) able to render color .ppm files without
modification. (Gimp will create .ppm) Looks pretty good if you
don't try to throw too many colors at it.
File attached, copy the .ppm image files to your SD, and UNremark
the proper line to view. (Several test images included.)
The tables are a little laborious, if you see a shortcut, jump in. [noparse]:)[/noparse]
OBC
rename with .zip extension
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
A Living Propeller FAQ - The Propeller Wiki
(Got the Knowledge? Got a Moment? Add something today!)