I am trying to make very simple ISO engine in PHP, my attempts to render in correct place, order etc are succeding however the images drawn, for some reason are black where it should be transparent. PNG files have transparency channel and I am using following test code: http://pastebin.com/TXk4LkJ8 The code is just rough draft.
Files are just 3 faces of an block with dimensions as follows: top - 44x22; sides:23x34
Thank you for your help and I hope the question is clear enough.
Edit: Here is the problem: http://dl.dropbox.com/u/10530011/obrazki/isofail.png
Edit: [SOLVED] For some reason I had to save the images as GIF to make it work. Thank you for your help.
The default background is black, so your transparency will look black unless there is anything behind it or you change the background. The PNG is absolutely transparent. There were PNGs that i had imported before without any problem. I used to get the transparency.
If your PNG image is saved with a transparent background, it will appear with a black background in Brainshark. That is because transparency in images is not supported in Brainshark. As a workaround, you can either add in a plain background using an image editing program, or try to save the image as a JPG or GIF.
When a PNG image with a transparent background is selected from the Recent FIle selector and appears with a black background, the black background can be removed by re-uploading the image as a New File each time you use the image.
You should call these two functions before saving the png image, imagealphablending() and imagesavealpha():
imagealphablending( $image, false );
imagesavealpha( $image, true );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With