Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 31st Jan 2008 07:07
Just wondering if there are any known issues or bugs in DBPro regarding png files or alpha channels. I have 2 almost identical images, both created in PSPro, that used to work fine in my program - now I can't make the background dissapear in one to save my life, the other still works perfectly. And I was never able to make 'SET IMAGE COLORKEY' work...


Foz, I am.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 31st Jan 2008 08:54
SET IMAGE COLORKEY is irrelevant for PNGs. Make sure the object transparency is on.
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 1st Feb 2008 01:45
That's another thing, I added the "1" flag while loading the image to turn the transparency on, and it still wouldn't work. And even stranger, I deleted the flag in the other, working image - no change...

I'm about to find a new hobby - can't go 15 min. without hitting a wall...




Foz, I am.
Don Malone
21
Years of Service
User Offline
Joined: 27th Apr 2003
Location: Birmingham, Alabama
Posted: 1st Feb 2008 04:11
First thing that jumps to my mind is that one of the images might not have an alpha channel for transparency. Do you have the original images or just the PNG file? You might have to export the image again to a png with an alpha channel.

I am no expert but I have done this several times and had to save the image again to get my transparency.

Don.

By the way I use an old version of PSP (version 5.03)

Making nothing for the forth straight year; or is it five years now?

Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 1st Feb 2008 07:18
I use PSP XI - and I don't technically 'export' to a PNG, I find it just as easy to manually add a mask layer. It's kinda moot though, because both images were created the same way and one still works. I even tried simply drawing the new color over the working image and resaving under the other name, but it didn't buy it...


Foz, I am.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Feb 2008 09:57
The problem must be with the image, as there is nothing wrong with the texturing commands in this respect.

Maybe you can post your images and small code snippet for us to test?

By the way - the flag when loading the image is not a transparency flag. It determines whether or not the image is mipmapped.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 1st Feb 2008 11:23
How are you using the image?

1) Texturing a 3D object with it. Then use SET OBJECT TRANSPARENCY n,2 - The last flag can be a number from 1 to 6 which does different types of transparency. Use IDE help to see what they do.

2) Pasting the image. Use PASTE IMAGE n,x,y,1 - the 1 is the important bit

3) Using Sprites. Then use SET SPRITE n,0,1 - the last 1 makes sprite use transparency

Boo!
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 1st Feb 2008 18:58
Here are the images that have been helping me to release some of that grip on reality I've been clinging to this last week. These small cubes can be stacked in my program and so must be seemless. The blue one continues to work fine, at least for me. I must have inadvertently done something to the red one to make it lose its transparency, I just can't figure out what for the life of me.

If some brave soul could check this out and prove to me that I'm not crazy, there may be a huge monetary reward in it for you...(not really, I work at Wal-Mart).


Foz, I am.

Attachments

Login to view attachments
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 1st Feb 2008 18:59
whoops - shoulda used the applet. Here's the other image:


Foz, I am.

Attachments

Login to view attachments
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 2nd Feb 2008 03:49
Okay, Mr. bad_png.png presents no issues for me. Perhaps your method of using it is incorrect? In fact, that's it. There is no problem. Here's the code that I loaded it with.




Come see the WIP!
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 3rd Feb 2008 02:39
Thanks - I'm closer to the answer I'm looking for now. The problem is that I'd rather use 'paste image' because I will need to have many - possibly hundreds - of each of them on the screen at one time. For the sake of speed, I don't want to clone the sprite or work in code to provide a unique sprite # each time. Am I completely off-base, or is there another answer?...


Foz, I am.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 4th Feb 2008 01:07 Edited at: 4th Feb 2008 01:07
Both images work perfectly for me and overlap with transparency just fine. If you set trans to 0 it will paste without transparency and is quite obvious because of white background overlapping.



Above code produces this:



Boo!

Attachments

Login to view attachments
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 4th Feb 2008 03:46
Well, this latest cluster**** of mine is over. I've discovered why one of my flags had been hidden this whole time - which is especially frustrating, because I even brought the images into a completey different program and somehow copied the error along with it...

I love this site - so many people willing to help a person, even if that person is a dork.


Foz, I am.

Login to post a reply

Server time is: 2024-09-27 10:23:12
Your offset time is: 2024-09-27 10:23:12