Testing PNG images

General messages about RTC and it's development.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Gambit37 wrote:I was privileged to have 7 beta versions of v0.35 .... but at no point did GG hint at PNG support or all those extra sound formats!
I guess I didn't see the point of keeping even the beta testers in the dark about the new features-- they can't test what they never see, and the amount of bugs in the new features suggests that a bit more testing would've been nice. :(
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I understand where you're coming from, but at the same time, I can understand the 'wow' factor about including something that we've been asking for and more or less given up on. It was a great surprise!
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Hehe, yeah..

"Wow! This is so cool!"

5 minutes later...

"Wow! It doesn't work!"

:wink:
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I've tried a few things with PNG already and they worked for me. Don't be so harsh about one image that crashed your dungeon. Maybe it's a weird flavour of PNG? How are you saving it?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

I think it has to do with trying to replace blue haze and fluxcages with a PNG with an alpha channel, and not anything to do with the PNG itself... I tried a few images and they all crashed when used like this. Of course, they were all generated by the same program (Paint Shop Pro) so if the program itself does something weird when saving, who knows!

The PNGs themselves are noninterlaced, truecolor with an alpha channel obviously... beyond that, I don't really know enough about the format to say anything useful about it.

For the record, it wasn't my intention to be 'harsh,' merely point out that the surprise was two-fold. ;)
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I'll try with one from PhotoShop and I'll clean it up using the various PNG utils I've got and see if anything has the same effect.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

I've now reproduced the problem - it's nothing to do with PNG at all.

You can get it to crash by using an ordinary bitmap for the blue haze, but with setting the transparent flag to TRUE. So I'd say, you didn't test the code you were given in the first place well enough :wink:
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Oh! Can't trust those beta testers to do anything right, can you? :wink:

Will a PNG still be transparent even if you don't set the transparent flag?
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

The transparent flag gives every pixel in the bitmap an alpha value of 0.5 (128). If the image already had an alpha channel, then it halves the value of each existing alpha value.

So, to answer your question - yes. In fact, for PNG images, you'd probably never want to set the transparent flag to TRUE (because even if you wanted it to be 50% transparent, you might as well do it explicitly in the alpha channel).
Post Reply