This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Loading TGA file with EASYCE


Loading TGA file with EASYCE

Postby Danyblue » Sep 4, 2001 @ 6:41am

Hi all<br>I have been trying to load an background image from a file using your routines "Loadtga" and i am not able to visualize them on the screen. <br>I am using the sample code of Easyce, and for bitmap I've tried images that i created with GIMP, but now to try to discover where is the error i am debugging with an image from the lemmings source code.<br>Could any one help me??<br><br>Thanx<br><br>Danyblue<br><br>void main()<br>{<br>unsigned short* p = (unsigned short*)getbuffer();<br>loadtga(L"\\MY Code\\sampleapp_easyce3\\background.tga",240,320,p,true);<br>while (1) { update(); if (clicked()) break; }<br>}
Danyblue
 


Re: Loading TGA file with EASYCE

Postby Phantom » Sep 5, 2001 @ 11:38am

Hi,<br><br>You should check a couple of things:<br>1. Is the image you're trying to load exactly 240 pixels wide and 320 pixels high?<br>2. Did you save the image as UNCOMPRESSED tga?<br>3. I'm not sure if the example code expects a palettized or hi-color image. It definitely does not expect a 24 bit image.<br><br>Hope this helps,<br>Jacco.
Phantom
 


Re: Loading TGA file with EASYCE

Postby Danyblue » Sep 7, 2001 @ 10:48am

How do i validate a file, the programs that i use seems to be unable to create the 16 Bit format.<br><br>I've tried GIMP and PAintShop Pro, do you use any specific??<br><br><br>Regards,<br><br>Danyblue
Danyblue
 


Re: Loading TGA file with EASYCE

Postby Phantom » Sep 7, 2001 @ 11:48am

I use paintshop pro. When you select 'save as', you can select tga, and specify options for it. One of the options is the color depth, select 8bit or 16bit. Another option is compressed/ uncompressed, select uncompressed. That should do the trick.
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: Loading TGA file with EASYCE

Postby danyblue » Sep 8, 2001 @ 9:57am

Hi,<br>i had try paintshop with the options but when i tried to save in 16 bits, i've got an error saying that the operation was impossible to do and that 24bit would be used.<br>the functions of loadtga, support only 256 colors (8bits) or must it be 16 bits (for the RGB).<br><br>Regards,<br>danyblue
danyblue
 


Re: Loading TGA file with EASYCE

Postby Phantom » Sep 8, 2001 @ 12:39pm

Hi,<br><br>Impossible to do? That's odd. What version of PaintShop are you using? I do this all the time. :) Anyway, if you have an older version of Paintshop, you might try to convert the image to 16bit color or 8bit color (from the color menu) prior to saving it. That might help. This is definitely not neccessary with the latest version of Paintshop however.<br><br>- Jacco.
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: Loading TGA file with EASYCE

Postby danyblue » Sep 11, 2001 @ 3:06pm

HI Jacco,<br>i am using the last version of paintshop pro, i have downloaded it just for this purpose.<br>Meanwhile i have already achieved to compile and run with success your new example (spriteunlimited) on X86 emul with the GAPI emulation lib, so I think that my case it must be a problem with my graphics files.<br><br><br>Regards,<br>Danyblue
danyblue
 


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

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 post attachments in this forum

cron