Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
During my nearly Kerm-level amount of free time, I'm going to make a program that will display pictures in the full 320x240 resolution.
GitHub Repository.
I noticed that when you send a picture to your calculator via TI Connect CE, it super-reduces the quality to the point you can't make out much detail at all. During my (currently paused) attempts at making a YouTube looking GUI, I found that ICE can display images at much higher quality!

(total image quality is reduced due to massive size of original. Which you can view here and here)

Originals here and here. The TI Connect-sent space one doesn't look that bad, until you look closer. Also, please ignore the annoying loading indicator on the ICE one. I have no idea why it's there.

Ever since, I've been trying to get a picture of the full 320x240 resolution onto my CE using ICE. The problem is, the amount of data from converting a 320x240 to hexadecimal is massive. I cant fit it all into one program. So I'm following the advice of nearly everyone, and putting all the hex code into an App Var.

My current problem is, I don't understand how to get the hex code from the App Var I made. I tried looking at the examples PT_ included with ICE, but there are no comments so it wasn't much help. I also tried commands from the command index that looked like they may work, but I had a 100% fail rate trying that. Razz The search bar on Cemetech wasn't any help either.

So my question: How do I call the Hex data from the app var I made?
Or should I make the picture just a single tile of a tile-map and call it that way? (I only ask this since it's the only thing I could find that was anywhere close to what I need)

Thanks to PT_ and MateoC, I got this straightened out!

This is the code for the convPNG.ini file
Note: your picture MUST be 320 pixels wide and under 196 pixels tall!

Code:
#GroupICE               : ice_gfx
#Palette                : xlibc
#PNGImages              :
  <image name>
#AppvarICE : <app var name>
#PNGImages              :
  <image name>


This is the code to display an app var:

Code:
[i]SPITE
sum(0
det(0
Copy(|ED40000,GetDataPtr(Open("<app var name>","r"))+2,<size, formatted as: width*height>
Pause
det(1

PT_ can explain how the code works.

Current plans:
    Get this into a GUI program
    Add GIF-like abilities
    Make tutorial
    Release into Archives (Yes I know SplashCE is already there, but mine will be more efficient and wont make Mateo cringe (as much)!


EDIT: 600th post!
Wow, that is a really impressive difference. Will it just take pre-existing images sent to my calc, or will I need to resend them?
The quality is amazing! How big is the program? (And the appvar?)

From the ConvPNG code, I take that it converts the image to an appvar. I wish we could somehow make a linking program that would automatically do that since If I have to use ConvPNG every single time, it's kind of annoying.

Just a quick question. If I send an image to the calc and store it as an image (background), is it completely messed up already? As in the quality is reduced?

Is it possible at all to make a new type of image file that doesn't destroy anything, or change how saving images works, to break it down into code, to then be recalled?
21tmccauley wrote:
Wow, that is a really impressive difference. Will it just take pre-existing images sent to my calc, or will I need to resend them?

This will not accept imagevars or backgroundvars. You must take an image on your computer, convert it to an app var(like jcgter said) using convPNG and the provided code for the .ini file, then send the program and app var to your calculator. Next you need to edit the uncompiled source code so it is using the correct app var, then you need to specify the width and height. I thought this would be common knowledge.
***TheLastMillennial ruuuuns
I'm kidding of course, you're good : )

jcgter777 wrote:
I wish we could somehow make a linking program that would automatically do that since If I have to use ConvPNG every single time, it's kind of annoying.

Same here, I'm sure it's doable, just not worth the effort right now. Besides, you can compile multiple images at once so it's not too bad.
jcgter777 wrote:
Just a quick question. If I send an image to the calc and store it as an image (background), is it completely messed up already? As in the quality is reduced?

Sadly, yes. The quality is already messed up. :\
jcgter777 wrote:
Is it possible at all to make a new type of image file that doesn't destroy anything, or change how saving images works, to break it down into code, to then be recalled?
Um, this isn't my area of expertise, but I'll throw in what I think is possible. (Take it with a grain of salt though Razz ) I think You could probably make a new image file, but
1. TI Connect would refuse to send it since the file extension would be different
2. Even if it did send, the calculator would have no idea what to do with it.
1.5. Also you couldn't send the file from your calculator to another calculator unless you had some ASM wizardry going on on both ends.
3. If you made a program that let the calculator view the image... what else can you do with it? (look at it's prettiness, duh)
4. Making a complex program filled with hooks to allow you to easily view and use the image and overlay a graph on it would be extremely difficult (I would think) and probably not worth the effort since the whole point would be to just use a higher quality image. Wink

I'll try to get a tutorial up as soon as possible. Which may be in a week, or in several months. Laughing
How about the code in a program that gets converted and stored into an appvar and then deleted?


EDIT: That won't work since to get the code, I'd still have to use ConvPNG.

I think SC3 has a nice converting tool that makes nice images. It also gets the code, so maybe...
jcgter777 wrote:
I think SC3 has a nice converting tool that makes nice images. It also gets the code, so maybe...

That was what I thought at first too, just use SC3! Unfortunately, SC3 doesn't convert images in the correct way for ICE to use it. Only convPNG does right now.

EDIT: It appears PT_'s code isn't ideal for this type of program. Unfortunately it only works when the width of the image is 320 pixels. Any more or less than that and it'll skew the image. Is there a piece of code that will allow any size image (within the 320x240 boundary) to be properly displayed?
The code that isn't working the way I'd like it is here:

Code:
Copy(|ED40000,GetDataPtr(Open("<app var name>","r"))+2,<size, formatted as: width*height>
I'm excited for a tutorial on how to get these high-quality images, as when it comes to knowledge of coding, in any language, I am a peon on the hierarchy of knowledge!
21tmccauley wrote:
I'm excited for a tutorial on how to get these high-quality images, as when it comes to knowledge of coding, in any language, I am a peon on the hierarchy of knowledge!


It's actually quite easy. In TLM's case, you convert an image to an appvar, send that to your calc, and use a program to display it. You can also just make your sprite your image, and display that sprite.
Happy Valentines day everybody! Very Happy
Has this program been released anywhere
As you can see, the regular graph screen background has some random pixels on the top few rows.
TheLastMillennial wrote:
Happy Valentines day everybody! Very Happy

Does anyone know why it does that?
I think it's just a lesser-known side effect of running ICE, C or ASM programs. I've seen that after running an ICE program. Just run ClrDraw to erase the pixels.
timedia: Nope, I want to make the program look and work better before I release it. Smile

Although that may be true some of the time SM84CE, when I was browsing my storage, I was in the Yvars section and I saw 4 variables that were something like Xτ₁ through Xτ₅ that were ~21000 bytes each. They were in the RAM which didn't make any sense because I still had 130000 bytes of free RAM left, the math didn't add up. I tried to delete them but my calculator suddenly jumbled up the screen and displayed unmapped memory at the bottom, then it froze. I have no idea if that's due to the program (it hasn't happened since), due to ICE, or just a random bug, but it was weird.
uhh... the last time that happened for me, I was using a new version of Cesium with an old save file, which was what caused the corruption. Try reinstalling Cesium, and deleting the AppVar. If that doesn't work, try ICE next...
This is amazing! I've been wondering if it was possible to display HD images like that and I never realized it even though I code with ICE almost everyday! I'm looking forward to using this in my next program!
SahilS wrote:
This is amazing! I've been wondering if it was possible to display HD images like that and I never realized it even though I code with ICE almost everyday! I'm looking forward to using this in my next program!
I'm glad you're excited for it! I'll have a beta out as soon as possible! My best guess is I'll have a (mostly) stable release in 2 months max. Smile
This is a nice program. Before, if I wanted to display hi-def images, I'd convert the image into ICE compatible sprite data, and copy that to my calc in an ICE program to display. This is a much better way to do it. TLM++!!! Very Happy
Quote:
I'm glad you're excited for it! I'll have a beta out as soon as possible! My best guess is I'll have a (mostly) stable release in 2 months max. Smile


Sweet! I'll be looking forward to it! I think this would be great to use as a GUI background. I've been making clones of apps using ICE so having this will be an amazing upgrade.
I'm suppose to be in bed, but I have to post this before I forget.

So due to ICE and Appvar limitations, the maximum picture can only be under 64kb and within a 255x255 boundary for normal display routines. The screen is only 240 pixels tall so that makes the max picture size 255x240. I could do that size, or I could make the max image size a square 240x240.

Here is a picture of the comparison between a 255x240 (orange line) size and a 240x240 (red line) size. I overlayed it on Cesium just for comparison sake.

What would you guys like? I'm personally leaning towards the square 240x240 size since I think it'll be easiest to work with and it's not that much of a difference from 255x240.
I think the square's also the best choice. (I'm also supposed to be in bed Razz)
  
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
Page 1 of 4
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement