Author Topic: Nspire bmp viewer  (Read 22257 times)

0 Members and 1 Guest are viewing this topic.

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Nspire bmp viewer
« on: June 09, 2010, 02:34:28 am »
I was experimenting with bitmap file loading today, and the program has reached a semi-usable state, so here it is.
It has no file browsing, so to use it, you will need a 24-bit bmp file with dimensions less than 320x240, renamed to
test.tns and placed in a folder called bmpviewer on the Nspire. It has only been tested with bitmaps produced by the GIMP.
Hopefully I will figure out how to add more features (like browsing) in the future.
Enjoy!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire bmp viewer
« Reply #1 on: June 09, 2010, 02:36:27 am »
mhmm interesting I shall try it out when I get some time. I believe someone did something similar on TI-BANK a while ago but it was never tested on real hardware and is only in french.

Will you eventually support different bmp formats as well as gif/jpg/png?

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire bmp viewer
« Reply #2 on: June 09, 2010, 02:38:32 am »
Different bmp formats and gif, maybe.
JPG/PNG, probably no. The compression in JPG is rather complex.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire bmp viewer
« Reply #3 on: June 09, 2010, 02:38:52 am »
aaah ok, sound good still :)

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Nspire bmp viewer
« Reply #4 on: June 09, 2010, 07:55:06 am »
That's pretty sweet! It's nice that the Nspire will have an actual bmp viewer. Cool stuff! ^^.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire bmp viewer
« Reply #5 on: June 09, 2010, 12:50:11 pm »
Sorry but I can't get it to work :(

I followed instructions in the readme and even tried with both my own pics and your examples, renamed to test.tns and tested one by one and when I run the viewer all I get is a blank screen until I press ESC (which quits back to the Nspire) ???

SirCmpwn

  • Guest
Re: Nspire bmp viewer
« Reply #6 on: June 09, 2010, 12:51:58 pm »
Good stuff, bwang.  Sounds pretty cool.  Now, lets get a rickroll to work on an Nspire.

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire bmp viewer
« Reply #7 on: June 09, 2010, 03:25:38 pm »
DJ, did you put them in a folder called bmpviewer? The pictures and the program need to be in the same directory.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire bmp viewer
« Reply #8 on: June 09, 2010, 03:40:29 pm »
oh it needs to be in that directory in particular? You should probably make it directory-independent in future versions (even if the images still has to be in the same directory as the app. just not force the app to be in bmpviewer, or at least explain more clearly in the readme (which I read, btw) that the app absolutely needs to be in that directory). Thanks for the tip, though.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Nspire bmp viewer
« Reply #9 on: June 09, 2010, 03:47:50 pm »
oh it needs to be in that directory in particular? You should probably make it directory-independent in future versions (even if the images still has to be in the same directory as the app. just not force the app to be in bmpviewer, or at least explain more clearly in the readme (which I read, btw) that the app absolutely needs to be in that directory). Thanks for the tip, though.
DJ,
Hopefully I will figure out how to add more features (like browsing) in the future.
Bwang, this sounds neat!  Now if only I had an Nspire... ;D
« Last Edit: June 09, 2010, 03:47:59 pm by ztrumpet »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire bmp viewer
« Reply #10 on: June 09, 2010, 03:50:34 pm »
Yeah I know, I meant it might be good to clarify that the viewer has to be in one folder in particular to run.

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Nspire bmp viewer
« Reply #11 on: July 10, 2010, 02:19:49 pm »
If this could work with animated gifs, it would be boss.

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: Nspire bmp viewer
« Reply #12 on: July 10, 2010, 04:45:57 pm »
I think I missed this when it was originally posted.  I just tried this out and it works nicely! :) Great job!


Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire bmp viewer
« Reply #13 on: August 05, 2010, 02:45:11 am »
Many weeks later, I have finally added file browsing (of a sort).
Limitations:
bmps must be 320x240 or less, and 24-bit
bmp names must be of the form *.bmp.tns
bmps must reside in a directory called bmpviewer (the program itself need not reside there)

Controls: At the file selection screen, press RETURN (next to ENTER) to view. Press ESC to exit from the viewing.
The controls aren't very smooth since the keypress delay method I use is terrible so you may have to hold a key down for a while for it to register.

The program is compilable for NON-CAS only, since I don't have the directory listing functions for the CAS.
Next up: scrolling (easy) and images in different directories (I don't know how hard that will be yet).
« Last Edit: August 05, 2010, 04:10:18 am by bwang »

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Nspire bmp viewer
« Reply #14 on: August 05, 2010, 08:31:41 am »
Nice to see updates! :) I may actually be getting a Nspire soon, but I haven't decide yet.