Author Topic: Online PNG/GIF/BMP/etc. to TI.Image converter (sprites/images on the Nspire)  (Read 29187 times)

0 Members and 1 Guest are viewing this topic.

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Hoffa, is there any way to get an offline converter, or is this only online?
Actually there is, and there have been one since TI released Scripting Tools. I had never noticed it (actually I did, but wasn't sure what it was for), but the button for "image serialization" actually copies to clipboard the TI.Image of an traditional image format (PNG, BMP, nearly anything).

Offline pianoman

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 426
  • Rating: +24/-0
  • ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫
    • View Profile
Got it, thanks.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
I was first :p
I made a offline converter in python more than a month ago :D

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
Lol nice jim :P. Also we released Lua makers before TI did :P. On top of that on TI site good luck finding the Lua tool from the front page. It's well-hidden.

Offline pianoman

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 426
  • Rating: +24/-0
  • ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫
    • View Profile
Wait, where is this python converter?

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
This is the link to it http://bwns.be/jim/convert.py .
You need pythonmagick to use it (Linux users can use the package manager to install it).

Usage: convert.py infile.png data.txt

Offline jboavida

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 6
  • Rating: +0/-0
    • View Profile
Hi Hoffa,
Can you please send me the Lua script for simple_image_viewer.tns?

I try to use the functions directly by I got an error

gc:drawimage (image,0,0)  attemp to index global "gc" (a nil value)

Thank you

Joaquim

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
jboavida, you need to put gc:drawimage (image,0,0) inside on.paint, like this:
Code: (Lua) [Select]
function on.paint(gc)
    gc:drawimage (image,0,0)
end

on.paint get called every time the screen gets/needs to be redrawn (for example when you open the program or run platform.window:invalidate()

Everything that uses gc should be called from on.paint. I recommend you to read  the tutorials at http://www.inspired-lua.org/category/tutorials/starting-in-lua/ , they will help you understand how nspire Lua works.

Offline jboavida

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 6
  • Rating: +0/-0
    • View Profile
jimbauwens thanks for the tip . It's working now.

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
The website in the first post is now filled with pictures of birds and the hoffa.zzl.org site I had been using a while is now down.

So what're my options for converting pictures of .png into TI Image with support for transparency (any color)?

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
hoffa.zzl.org is up for me. It doesn't seem to be updated tho.




Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Ah it has returned!  :w00t: 0.6 is good enough for me.

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
I haven't been here for a while as I'm currently in the army. I updated the link to the newest version.
« Last Edit: August 29, 2012, 05:14:37 am by hoffa »

Offline Jonius7

  • python! Lua!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1918
  • Rating: +82/-18
  • Still bringing new dimensions to the TI-nspire...
    • View Profile
    • TI Stadium
More necroposts. (shows a bit of inactivity in Lua lately)
Yeah Image to TI.Image is now at http://hoffa.franceserv.fr/tiimage
Programmed some CASIO Basic in the past
DJ Omnimaga Music Discographist ;)
DJ Omnimaga Discography
My Own Music!
My Released Projects (Updated 2015/05/08)
TI-nspire BASIC
TI-nspire Hold 'em
Health Bar
Scissors Paper Rock
TI-nspire Lua
Numstrat
TI-nspire Hold 'em Lua
Transport Chooser
Secret Project (at v0.08.2 - 2015/05/08)
Spoiler For Extra To-Be-Sorted Clutter:

Spoiler For Relegated Projects:
TI-nspire BASIC
Battle of 16s (stalled) | sTIck RPG (stalled) | Monopoly (stalled) | Cosmic Legions (stalled)
Axe Parser
Doodle God (stalled while I go and learn some Axe)

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
shows a bit of inactivity in Lua lately

I've been fairly busy in the Lua world, I just don't post a lot ^^
And I'm sure others do the same ;)