Page 1 of 1
Loading TGA file with EASYCE

Posted:
Sep 4, 2001 @ 6:41am
by Danyblue
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>}
Re: Loading TGA file with EASYCE

Posted:
Sep 5, 2001 @ 11:38am
by Phantom
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.
Re: Loading TGA file with EASYCE

Posted:
Sep 7, 2001 @ 10:48am
by Danyblue
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
Re: Loading TGA file with EASYCE

Posted:
Sep 7, 2001 @ 11:48am
by Phantom
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.
Re: Loading TGA file with EASYCE

Posted:
Sep 8, 2001 @ 9:57am
by danyblue
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
Re: Loading TGA file with EASYCE

Posted:
Sep 8, 2001 @ 12:39pm
by Phantom
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.
Re: Loading TGA file with EASYCE

Posted:
Sep 11, 2001 @ 3:06pm
by danyblue
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