* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: Simple Image Viewer  (Read 1342 times)

0 Members and 1 Guest are viewing this topic.

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 740
  • Post Rating Ratio: +15/-7
  • TI-nspire porter
Simple Image Viewer
« on: January 09, 2017, 03:01:29 am »
Here's a simple image viewer for the TI Nspire CX. (not compatible with the grayscale models !)



It supports PNG, BMP, and JPEG files. (Only RGB baselines files are supported for jpeg)
It's pretty fast, fairly small and has a codebase that is easier to read than mViewerCX, which is absolutely monstrous...
However it struggles with big images files and there are some corruptions for BMP & JPEG files.
So if you want to load huge image files on your nspire, stick with mViewerCX.

For big images, switch to cropping mode with the DEL key and it will benefit from a smoother framerate, much better than mViewerCX.
However, you can't zoom in/out in "cropping" mode, unlike the default "scaling" mode.
It also uses my explorer browser, which is much simpler to use unlike the one in mViewerCX which is horrible to use, seriously.

I originally made this so i can watch my pr0nographic images on my calc and because i did not enjoy using mViewerCX
with its slow framerate and awful interface.

Source code is here :
https://github.com/gameblabla/simpleimageviewer

Here's an OS version for ControlX 4.3.6 (slower than ti version, if you can believe it) :
https://codewalr.us/index.php?topic=1820.msg50693#msg50693

Video of it running :
https://gameblabla.nl/files/imgviewer_speedcompar.mp4

There are still a lot of room for improvements :
fix the malloc issues with huge image files, work on something better than n2DLib for that purpose (and made in C, unlike nGL) etc...

Btw, this uses a modified version of n2DLib and Tiny JPEG decoder as well as LodePNG.
« Last Edit: January 10, 2017, 04:41:40 pm by gameblabla »


  • Calculators owned: TI Nspire CX, TI-89

Online Juju

  • aka Yuki Kagayaki aka J̵̭͕͇ù̞̭̝̯̦j̴̭̙̗͖͡ù͏͓̲̕
  • CodeWalrus Staff
  • Super User
  • Server Maintenance
  • Moderator
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Inside a walrus
  • Posts: 3096
  • Post Rating Ratio: +30/-2
  • Couch potato
    • jul.savard
    • juju2143
    • @juju2143
    • juju2143
    • @julosoft
    • juju-kun
    • /u/juju2143
    • juju2143
    • @juju2143
    • Juju's shed
  • Gender: Female
  • WalriiPoints: 99999
Re: Simple Image Viewer
« Reply #1 on: January 09, 2017, 03:19:21 am »
ohai it's me as the example~

Anyway, nice.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
On semi-hiatus until who knows when. CODEWALRUS 2.0 COMING SOON
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 740
  • Post Rating Ratio: +15/-7
  • TI-nspire porter
Re: Simple Image Viewer
« Reply #2 on: January 09, 2017, 03:38:45 am »
ohai it's me as the example~
Yeah... my computer is filled with pr0n and this was the only rare image that was not pr0nographic on my PC.
glad you don't mind

Also, i would be happy if anyone could take a look at the cooode and tell me what could be possibly improved.
« Last Edit: January 09, 2017, 03:44:14 am by gameblabla »
  • Calculators owned: TI Nspire CX, TI-89

Offline p2

  • CodeWalrus Staff
  • Super User
  • Moderator
  • CodeWalrus Supporter
  • *
  • Join Date: Aug 2016
  • Location: Germany
  • Posts: 2293
  • Post Rating Ratio: +9/-0
  • *Wubba lubba dub dub*
    • KaliPhobos
  • Gender: Male
Re: Simple Image Viewer
« Reply #3 on: January 09, 2017, 11:35:03 am »
having ONLY pron on your pc already sounds weird...
but it sounds even worse, having only pron aaaand pics of Juju on your PC :ninja:
I mean... WHY??  :ninja:

anyways, nice work, can you give us a gof of it and maybe some info on the speed and size? :)
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3165
  • Post Rating Ratio: +32/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • quantuminfinity
  • Gender: Male
Re: Simple Image Viewer
« Reply #4 on: January 09, 2017, 11:38:22 am »
(maybe the pron and the pictures of juju are on his pc for the same reason  O.O)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Offline p2

  • CodeWalrus Staff
  • Super User
  • Moderator
  • CodeWalrus Supporter
  • *
  • Join Date: Aug 2016
  • Location: Germany
  • Posts: 2293
  • Post Rating Ratio: +9/-0
  • *Wubba lubba dub dub*
    • KaliPhobos
  • Gender: Male
Re: Simple Image Viewer
« Reply #5 on: January 09, 2017, 11:41:19 am »
exactly what I was thinking...  :ninja:

inb4 kotu revealing Juju's and gameblabla's secret relationship....
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Online Juju

  • aka Yuki Kagayaki aka J̵̭͕͇ù̞̭̝̯̦j̴̭̙̗͖͡ù͏͓̲̕
  • CodeWalrus Staff
  • Super User
  • Server Maintenance
  • Moderator
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Inside a walrus
  • Posts: 3096
  • Post Rating Ratio: +30/-2
  • Couch potato
    • jul.savard
    • juju2143
    • @juju2143
    • juju2143
    • @julosoft
    • juju-kun
    • /u/juju2143
    • juju2143
    • @juju2143
    • Juju's shed
  • Gender: Female
  • WalriiPoints: 99999
Re: Simple Image Viewer
« Reply #6 on: January 09, 2017, 07:54:56 pm »
Haaa, I don't wanna know D:
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
On semi-hiatus until who knows when. CODEWALRUS 2.0 COMING SOON
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Offline p4nix

  • Full User
  • Join Date: Jun 2015
  • Location: Germany
  • Posts: 430
  • Post Rating Ratio: +6/-1
  • Don't catch the ball.
    • p4nix
  • Gender: Male
Re: Simple Image Viewer
« Reply #7 on: January 09, 2017, 08:00:19 pm »
Maybe you would switch your mind if you knew how @gameblabla looks like, please note it's only a identikit picture ;)
  • Calculators owned: fx9860GII (SH4)

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 740
  • Post Rating Ratio: +15/-7
  • TI-nspire porter
Re: Simple Image Viewer
« Reply #8 on: January 10, 2017, 04:25:34 pm »
I look nothing like this p4nix...

Also, for the kicks, i made an OS version based on Dummy OS.
This version requires the very latest version of ControlX installed, as version 3.4.5 has a bug that prevents Dummy OS from running.

I compared the Ndless version and the OS version and here's the verdict :
https://gameblabla.nl/files/imgviewer_speedcompar.mp4

The OS version, which has no overhead, more memory available, is twice to three slower than the TI version !
Not only that, it's very unstable and it will refuse to run if the image is more than 2MB...
Why is that ? Stack issues ? Missing code to turn it in fast mode ? Underclocked cpu ?
Or even something else entirely ?
Because it seems that it does not use the full 64Mb...

Btw, the os version is flickering because it has no buffering, i hope this will figured out because i don't have access to malloc.
(maybe it is in boot1 but where ?)

Oh, no way i would be interested in juju, he's too hairy and beardy.
« Last Edit: January 10, 2017, 04:28:26 pm by gameblabla »
  • Calculators owned: TI Nspire CX, TI-89

Offline p2

  • CodeWalrus Staff
  • Super User
  • Moderator
  • CodeWalrus Supporter
  • *
  • Join Date: Aug 2016
  • Location: Germany
  • Posts: 2293
  • Post Rating Ratio: +9/-0
  • *Wubba lubba dub dub*
    • KaliPhobos
  • Gender: Male
Re: Simple Image Viewer
« Reply #9 on: January 10, 2017, 04:31:30 pm »
that beard sure is worth zooming in  :thumbsup:
but it wurts to see you use inverted controls D:

anyways the speed is still impressive :)
I wonder how much the speed would drop for multi-layer games... O.O
what language is used for the CX CAS again...? (I happen to have that one, too)
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 740
  • Post Rating Ratio: +15/-7
  • TI-nspire porter
Re: Simple Image Viewer
« Reply #10 on: January 10, 2017, 04:36:23 pm »
that beard sure is worth zooming in  :thumbsup:
worth the wait

anyways the speed is still impressive :)
*
I disagree, the OS version is fricking horrible...
If anyone wants to take a look at the dummy os version, it's here :
https://github.com/gameblabla/simpleimageviewer/tree/dummyos

I wonder how much the speed would drop for multi-layer games... O.O
what language is used for the CX CAS again...? (I happen to have that one, too)
It's entirely programmed in C here with the GCC toolchain.
Of course, this only works with Ndless or ControlX.
  • Calculators owned: TI Nspire CX, TI-89

Offline p2

  • CodeWalrus Staff
  • Super User
  • Moderator
  • CodeWalrus Supporter
  • *
  • Join Date: Aug 2016
  • Location: Germany
  • Posts: 2293
  • Post Rating Ratio: +9/-0
  • *Wubba lubba dub dub*
    • KaliPhobos
  • Gender: Male
Re: Simple Image Viewer
« Reply #11 on: January 10, 2017, 04:38:31 pm »
ugh, havng to learn C first... D:

I still like it, even if you think its too slow xD
Fot an image viewer, it's perfect :)
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games