Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: twin-moon on Wed 05/03/2008 20:37:16

Title: Bug report: wrong error message
Post by: twin-moon on Wed 05/03/2008 20:37:16
Minor bug:
When I imported a background into my 320x240, 256 colour game, AGS told me:

"The background could not be imported. The error was:
You cannot import a hi-colour or true-colour image into a 256-colour game."

But the error was that my resolution was wrong. I had me thinking I was crazy for a minute.
Title: Re: Bug report: wrong error message
Post by: Pumaman on Wed 05/03/2008 21:22:29
Can you post the image that you tried to import? That error should only appear in the circumstances that it describes.
Title: Re: Bug report: wrong error message
Post by: twin-moon on Fri 07/03/2008 13:12:06
It was this one (http://i264.photobucket.com/albums/ii175/twinmoon_1979/outside-1.png)

I've discovered some more:
When I use 320x240 with hi-colour it stretches the image out to 240. When I change back to 256 colours and import it again, it gives me the error message that I can't import hi-colour images in a 256 colour game.

Probably because it tries to stretch it out and stretching out requires hi-colour?
Title: Re: Bug report: wrong error message
Post by: BOYD1981 on Fri 07/03/2008 21:51:54
although that image does use less than 256 colours my guess is that it actually needs to be using an actual 256 colour palette otherwise AGS is just going to assume it's high colour and not 256 and give you that error.
Title: Re: Bug report: wrong error message
Post by: Gilbert on Sat 08/03/2008 01:06:37
Right, that image is actually a 24-bit true colour image. Remember when you import an image into a 8-bit game, it's that the image has to be saved as a 8-bit format, not just it uses less than 256 colours.
Title: Re: Bug report: wrong error message
Post by: twin-moon on Sat 08/03/2008 13:00:35
?? That's odd. I've uploaded a wrong pic. Here it is again (http://i264.photobucket.com/albums/ii175/twinmoon_1979/outside-1.png).
It's definitely in 256 colour, if it isn't my hosting service did something to it.

I've checked again to make sure I didn't accidently try to use a hi-colour image in the editor, but it still gives me the wrong error message.
Title: Re: Bug report: wrong error message
Post by: Gilbert on Sat 08/03/2008 16:06:00
No, it's 24-bit, at least the one I downloaded is.

What programme did you use to save the PNG?
Title: Re: Bug report: wrong error message
Post by: Pumaman on Sat 08/03/2008 22:07:07
The first image you posted was 32-bit and wouldn't import into an 8-bit game for obvious reasons.

However the new one that you've uploaded is indeed 8-bit, and I am able to import it into an 8-bit game fine. Are you sure it's this image and not the previous one that was causing the error?
Title: Re: Bug report: wrong error message
Post by: twin-moon on Sat 08/03/2008 23:16:05
When I import the image in a 256 colour game with resolution 320x240 I get the error message "You cannot import a hi-colour or true-colour image into a 256-colour game."
It should say that the resolution is wrong, but not that the colour depth is wrong.

Quote from: Gilbot V7000a on Sat 08/03/2008 16:06:00No, it's 24-bit, at least the one I downloaded is.
What programme did you use to save the PNG?

The first one was hi-colour, my mistake, but if you download it again it should be 256 colour.
I used Paint Shop Pro.
Title: Re: Bug report: wrong error message
Post by: Pumaman on Sat 08/03/2008 23:52:56
Thanks, I have now replicated the fault. Seems .net doesn't handle 8-bit images very well so I'll have to make some changes to get it fixed.
Title: Re: Bug report: wrong error message
Post by: Gilbert on Sun 09/03/2008 04:48:50
Odd, the last time I checked, the second link pointed also to a 24-bit image. It is 8-bit now, possible some kind of browser cache problem. I'm glad the problem is sorted out.

However, your first image was not hi-colour, it was true-colour.

Title: Re: Bug report: wrong error message
Post by: twin-moon on Sun 09/03/2008 13:30:19
Quote from: Gilbot V7000a on Sun 09/03/2008 04:48:50However, your first image was not hi-colour, it was true-colour.
Yes, you're right. I tend to mix those up, which is of course wrong. (It's because in Paint Shop Pro there's only one 'mode' beyond 256 colour / 8 bit mode. You probably can distinguish between hi-colour and true-colour, but since I never use true-colour I never looked into it.)

Quote from: Pumaman on Sat 08/03/2008 23:52:56
Thanks, I have now replicated the fault. Seems .net doesn't handle 8-bit images very well so I'll have to make some changes to get it fixed.

Ok, good to know it's not just me ;)  Thanks.