This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
United-TI Archives -> TI-Basic
 
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Author Message
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 23 Nov 2003 01:45:28 pm    Post subject:

ClrDraw
RecallPic 0 //replace 0 with the pic to store in the list
95*64->Dim(LPIC //replace LPIC with the name of the list to store the pic to
For(A,0,94
For(B,0,63
If Pxl-Test(B,A
1->LPIC(95B+(A+1 //replace LPIC with the name of the list to store the pic to
End
End

You can of course optimise and change it, but this should give you the general idea.

Back to pic:
ClrDraw
For(X,1,95*64
If LPIC(X
Then
Int(X/95->B
X+1-95Ans
Pxl-On(B,Ans
End
End
StorePic 0


Last edited by Guest on 23 Nov 2003 01:54:31 pm; edited 1 time in total
Back to top
Jedd
1980 Pong World Champion


Elite


Joined: 18 Nov 2003
Posts: 823

Posted: 23 Nov 2003 03:11:50 pm    Post subject:

Is there any way you could do something like 1->LStr1 so that the user could enter the name of the list they wanted before it starts storing the pic?
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 23 Nov 2003 07:08:31 pm    Post subject:

That is impossible in basic. Also, I think storing Pics to Strings takes much less space.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 24 Nov 2003 07:02:11 am    Post subject:

Sir Robin wrote:
That is impossible in basic. Also, I think storing Pics to Strings takes much less space.

Depends heavily in the compression routines that are used, still, I doubt any screen with more than half it's pixels turned on will be smaller in a string or list.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 24 Nov 2003 04:51:48 pm    Post subject:

Arcane Wizard wrote:
Sir Robin wrote:
That is impossible in basic. Also, I think storing Pics to Strings takes much less space.

Depends heavily in the compression routines that are used

Numbers in strings always take less space than in lists, unless each number is more than 9 digits.

Quote:
I doubt any screen with more than half it's pixels turned on will be smaller in a string or list.


My compression program works based on changes in color, not on what the color is. A completely black picture would take up the same amount of bytes as a completely white picture - 16 bytes.
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 24 Nov 2003 07:22:21 pm    Post subject:

Yeah, but he means half and half or so. Like an actual picture, not just an empty (or dark screen)

Spyderbyte
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 24 Nov 2003 07:38:42 pm    Post subject:

I compressed one 47 by 47 image out of your avatar (the one of the spider) and got 560 bytes (not exact since I did half and multiplied by two). If you put it into a regular pic file, it would only increase by about 50 bytes, since the rest would be left blank.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 25 Nov 2003 09:27:24 am    Post subject:

Quote:
Numbers in strings always take less space than in lists, unless each number is more than 9 digits.
Jup, but Strings can become bigger than pics if there is too much data stored to them. So if anybody stores every single pixel of a pic to a string as x and y coordinates, for example, it would definetly become much bigger than a pic.

Quote:
My compression program works based on changes in color, not on what the color is.
Good for you, but who want's to store the pic of a completely white or black screen? Note I said it depends heavily on the compression routine used.

Quote:
How do you create lists?
1->dim(LNAME

Last edited by Guest on 25 Nov 2003 09:28:40 am; edited 1 time in total
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 25 Nov 2003 05:27:37 pm    Post subject:

You have to use the little L. Press [2nd][STAT][>][^].

Spyderbyte
Back to top
sgm


Calc Guru


Joined: 04 Sep 2003
Posts: 1265

Posted: 25 Nov 2003 06:21:26 pm    Post subject:

Arcane Wizard wrote:
ClrDraw
RecallPic 0 //replace 0 with the pic to store in the list
95*64->Dim(LPIC //replace LPIC with the name of the list to store the pic to
For(A,0,94
For(B,0,63
If Pxl-Test(B,A
1->LPIC(95B+(A+1 //replace LPIC with the name of the list to store the pic to
End
End

A little bug here, lists can't have more than 999 elements. You attempt to make one that is 6080. Oops.

And there's another, you can't Pxl-Text(>62,>94).


Last edited by Guest on 25 Nov 2003 06:23:07 pm; edited 1 time in total
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 26 Nov 2003 10:55:55 am    Post subject:

Ah yes, forgot that.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 27 Nov 2003 07:14:15 pm    Post subject:

When you create a list, you either say {0 -> Lname or go into the editor in the Stat menu, type in the name of the new list and press enter.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 28 Nov 2003 09:17:16 am    Post subject:

Creating lists:

{1,2,3,4->LNAME
1->LNAME(1
1->Dim(LNAME

Replace NAME with any combination of up to 4 characters.


Last edited by Guest on 28 Nov 2003 09:18:28 am; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 28 Nov 2003 03:06:07 pm    Post subject:

Up to 5 characters.

You can also do

{1,2,3,4 -> NAME

and it will assume NAME is a list and store to LNAME


Last edited by Guest on 28 Nov 2003 03:07:40 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Page 1 of 2 » All times are UTC - 5 Hours

 

Advertisement