Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
Lua
»
TI.IMAGE help
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: TI.IMAGE help (Read 5925 times)
0 Members and 2 Guests are viewing this topic.
pianoman
LV6
Super Member (Next: 500)
Posts: 426
Rating: +24/-0
♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫
TI.IMAGE help
«
on:
July 26, 2011, 09:12:08 pm »
I had an idea for a utility for Nspire programmers, but to make it, i need to understand the image format.
So my question is this: if you have the location and colors of all the pixels in a picture, how do you convert it to a TI.IMAGE?
Thanks
«
Last Edit: July 26, 2011, 09:12:46 pm by pianoman
»
Logged
Quote from: pianoman on May 25, 2011, 06:10:32 pm
I am a proud cynic.
Click Here to Give Me an Internet!
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10
31337 u53r (Next: 2000)
Posts: 1881
Rating: +206/-7
Linux!
Re: TI.IMAGE help
«
Reply #1 on:
July 27, 2011, 12:41:26 am »
Ti.image is kinda complex.Check out this page I wrote:
http://wiki.inspired-lua.org/TI.Image
.
Also, I can give you some python/javascript code to create Ti.images If you want
Logged
TI-Nspire projects of me:
nCreator
|
PCspire
|
Klondike Lua
|
LogoMagic
|
EEPro for the TI-Nspire
|
Pegs
|
General math definitions
|
Mini vMac
|
CHIP-8 emulator
Adriweb
Editor
LV10
31337 u53r (Next: 2000)
Posts: 1708
Rating: +229/-17
Re: TI.IMAGE help
«
Reply #2 on:
July 27, 2011, 11:44:03 am »
( which is right here :
http://bwns.be/jim/sprite.html
, thanks to our great jimbauwens
)
Logged
My calculator programs
TI-Planet.org
co-admin.
TI-Nspire Lua programming
:
Tutorials
|
API Documentation
pianoman
LV6
Super Member (Next: 500)
Posts: 426
Rating: +24/-0
♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫
Re: TI.IMAGE help
«
Reply #3 on:
July 27, 2011, 11:55:25 am »
Whoops, didn't notice the page
Holy cow, that's complicated.
How exactly does the pixel data work, though? Shouldn't each of the R,G, and B values be 8-bit numbers? Why are they 5-bit?
In other words, why doesn't it work A-RRRRRRRR-GGGGGGGG-BBBBBBBB instead of A-RRRRR-GGGGG-BBBBB?
If it isn't 8 bit, then you can't make numbers bigger than 31.
«
Last Edit: July 27, 2011, 01:09:29 pm by pianoman
»
Logged
Quote from: pianoman on May 25, 2011, 06:10:32 pm
I am a proud cynic.
Click Here to Give Me an Internet!
Adriweb
Editor
LV10
31337 u53r (Next: 2000)
Posts: 1708
Rating: +229/-17
Re: TI.IMAGE help
«
Reply #4 on:
July 27, 2011, 11:59:14 am »
Well you can always checkout jimbauwen's javascript/python's source code, it's very enlightening...
And btw, the official documentation might help you .... (the wiki is more detailed but may be harder to understand) - the official .doc documentation is much lighter about TI.Image....
Logged
My calculator programs
TI-Planet.org
co-admin.
TI-Nspire Lua programming
:
Tutorials
|
API Documentation
Lionel Debroux
LV11
Super Veteran (Next: 3000)
Posts: 2135
Rating: +290/-45
Re: TI.IMAGE help
«
Reply #5 on:
July 27, 2011, 12:50:53 pm »
pianoman, the R / G / B data is 5 bits because TI defined so
The CX's screen is used in 16-bit mode.
A1R5G5B5 is a fairly commonly used format. The link port screenshot command contains data in R5G6B5 format, AFAICS.
Logged
Member of the
TI-Chess Team
.
Co-maintainer of
GCC4TI
(
GCC4TI online documentation
),
TILP
and
TIEmu
.
Co-admin of
TI-Planet
.
pianoman
LV6
Super Member (Next: 500)
Posts: 426
Rating: +24/-0
♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫
Re: TI.IMAGE help
«
Reply #6 on:
July 27, 2011, 01:09:44 pm »
Oh, I think I get it.
Thanks!
Logged
Quote from: pianoman on May 25, 2011, 06:10:32 pm
I am a proud cynic.
Click Here to Give Me an Internet!
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10
31337 u53r (Next: 2000)
Posts: 1881
Rating: +206/-7
Linux!
Re: TI.IMAGE help
«
Reply #7 on:
July 27, 2011, 03:27:21 pm »
I see that you figured it out
Well, have fun with it!
Logged
TI-Nspire projects of me:
nCreator
|
PCspire
|
Klondike Lua
|
LogoMagic
|
EEPro for the TI-Nspire
|
Pegs
|
General math definitions
|
Mini vMac
|
CHIP-8 emulator
devpolytechnic
LV0
Newcomer (Next: 5)
Posts: 4
Rating: +0/-0
Re: TI.IMAGE help
«
Reply #8 on:
September 23, 2011, 07:54:55 am »
@pianoman
There's a scripting tool that's out there made by TI to help you convert images to TI.Images. The TI-Nspire Scripting Tool (
http://education.ti.com/calculators/downloads/US/Software/Detail?id=6840
) can help you convert your .lua files into copyable form, and you can copy that into a blank document on the TI-Nspire Student/Teacher Software, or you can use it to help you convert images into text form.
Convert a .lua file by clicking File -> Load Script App. This prompts a new window for the .lua location. Once you have selected so, click Enter and it will say at the bottom "yadayadayada...something has been placed on clipboard.". Go to your Nspire software, make a new document, but don't make a Calculator, Notes, etc. Instead, just click outside of it, and there's your blank document that says "Press Menu". Ctrl+V (Paste) it, and voila, whatever you wanted to convert into a .lua file should be inside it. (Although if you are trying to make a .tns, use Luna 2.0)
WARNING: This may cause some lag. Converting an image file you found from the internet to at least a million characters + may cause lots of lag.
Convert an image into text by clicking File -> Load Image. This prompts a new window, select the image, and hit Enter. It should also say at the bottom "...Something has been placed on your clipboard." Paste this into a text document (no OCLua, unfortunately, the calculator will say there are too many chars, and I don't think you want to copy one million numbers and slashes).
imageName = image.new("yadayadayadayadaimagetextcode") -- You probably know this anyway
I hope this helps!
Logged
i like programming
#include <iostream>
int main()
{
cout << "Hello, World!" << endl;
}
public class HelloWorld{
public static void main(String[] args){
System.out.println("Hello, World!");
}
}
Define helloworld()=
Prgm
Disp "Hello, World!"
EndPrgm
function on.paint(gc)
gc:drawString("Hello, World!",125,100)
end
Print
Pages: [
1
]
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
Lua
»
TI.IMAGE help