How would i set a picture as the background in my ICE program?
Use ConvPNG (found here).
Create a PNG that's 160x120 (or make sure your current PNG is 160 pixels by 120 pixels).
Put the PNG in the same folder as ConvPNG.
Create a file called convpng.ini in the same folder as ConvPNG.
Open convpng.ini in a text editor and make it look like this:

Code:
#AppvarICE   : <AppVarName>
#PNGImages   :
 <PNGName>

#GroupICE   : ice_gfx
#Palette   : xlibc
#PNGImages   :
 <PNGName>

where <AppVarName> is the name of the AppVar (E.G. IMAGE) and <PNGName> is the name of the PNG minus the .png (E.G. myimage)

Run ConvPNG and send the AppVar that gets created to your calculator.
To display it in your program (fullscreen), use:

Code:
LoadData("<AppVarName>",0,3)→<SpriteName>
det(62,<SpriteName>,0,0,2,2

Where <SpriteName> is the name of the pointer that you would like to store the sprite in (E.G. BGPIC)

You must include the AppVar with your program and have them both on your calc at all times.

Hope this helps,
calclover2514 wrote:
Use ConvPNG (found here).
Create a PNG that's 160x120 (or make sure your current PNG is 160 pixels by 120 pixels).
Put the PNG in the same folder as ConvPNG.
Create a file called convpng.ini in the same folder as ConvPNG.
Open convpng.ini in a text editor and make it look like this:

Code:
#AppvarICE   : <AppVarName>
#PNGImages   :
 <PNGName>

#GroupICE   : ice_gfx
#Palette   : xlibc
#PNGImages   :
 <PNGName>

where <AppVarName> is the name of the AppVar (E.G. IMAGE) and <PNGName> is the name of the PNG minus the .png (E.G. myimage)

Run ConvPNG and send the AppVar that gets created to your calculator.
To display it in your program (fullscreen), use:

Code:
LoadData("<AppVarName>",0,3)→<SpriteName>
det(62,<SpriteName>,0,0,2,2

Where <SpriteName> is the name of the pointer that you would like to store the sprite in (E.G. BGPIC)

You must include the AppVar with your program and have them both on your calc at all times.

Hope this helps,


This helped a ton! Thank you so much!
Tried using convpng, but convpng.log just said:

opened convpng.ini
[error] unknown command #AppvarICE\'a0 (line 12)

What does this mean and how can I fix it?
Argus wrote:
Tried using convpng, but convpng.log just said:

opened convpng.ini
[error] unknown command #AppvarICE\'a0 (line 12)

What does this mean and how can I fix it?

Are you using the latest version of convPNG?
(NOT the one included in ICE, but the one in mateoconlechuga's repository)



EDIT:
It appears that your text editor has converted the spaces in between 'AppvarICE' and the colon with some other character (a tab or something else). Simply remove the whitespace in between the two and it should work.

Fixed Example:

Code:
#AppvarICE: <AppVarName>
#PNGImages:
<PNGName>

#GroupICE: ice_gfx
#Palette: xlibc
#PNGImages:
<PNGName>

It looks less pretty, but it will probably work.
Thanks for the help! It worked this time!
Ok actually it only worked that one time. For some reason, when running convpng this time it generates convpng.log, ice_gfx.txt, and displays "finished converting image," but does not create the appvar. I've only ever used convpng once, and I've tried re-downloading the latest version from github, but I still get the same results. What am I doing wrong?
Console:

Code:
convpng v7.2 by m.waltz

opened convpng.ini

--- ice_gfx (ICE) ---
using built-in xlibc palette ...
1:
 image : converted!

convpng.log:
empty
Argus wrote:
Ok actually it only worked that one time. For some reason, when running convpng this time it generates convpng.log, ice_gfx.txt, and displays "finished converting image," but does not create the appvar. I've only ever used convpng once, and I've tried re-downloading the latest version from github, but I still get the same results. What am I doing wrong?
Console:

Code:
convpng v7.2 by m.waltz

opened convpng.ini

--- ice_gfx (ICE) ---
using built-in xlibc palette ...
1:
 image : converted!

convpng.log:
empty

I believe when this happens it means your image is too big. The maximum pixel count (width*height) should be less than 65,535. Make sure your image is under the required size and try it again.
Thanks. That's what was wrong. I thought that 320 x 240 resolution would look better, so I tried that instead.
  
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 1
» All times are UTC - 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