Author |
Message |
superman500
|
Posted: Thu Nov 16, 2006 1:37 am Post subject: taking out the background in pictures (setting transparency) |
|
|
you know how some pictures have the main picture and then the rest is filled in either white or black. Is there any way to make that part transparent in the turing program? Its sorta bad having a black square move around. I was wondering how would you make the white/black part of a picture transparent so it shows the background instead? Ive seen it done in the many mario games...Im just curious how. Can someone help me? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
NikG
|
Posted: Thu Nov 16, 2006 9:31 am Post subject: (No subject) |
|
|
It's been a while since I've posted here (or even used turing for that matter) so forgive me if I make a mistake.
I believe if you have bitmaps (and maybe jpegs as well) with white backgrounds, you can make those transparent. All you need is to use the picMerge flag in Pic.Draw.
something along the lines of Pic.Draw(picID, x, y, picMerge).
Just be careful if you have a lot of images you want to make transparent because this can slow down your program. |
|
|
|
|
|
NikG
|
Posted: Thu Nov 16, 2006 10:32 am Post subject: (No subject) |
|
|
Sorry for double posting.
Isn't there also a Pic.SetTransparentColor procedure that let's you change the transparency from white to another color?
Can someone confirm this please? |
|
|
|
|
|
ZeroPaladn
|
Posted: Thu Nov 16, 2006 1:06 pm Post subject: (No subject) |
|
|
Confirmed.
let colour be whatever you want, but i usually set it to something turing friendly (bring green)
As for Pic.Merge, I don't beleive you need it, because the pictures will automatically be seen through when the entire pic has a certain colour transparent, you can see behind that colour. |
|
|
|
|
|
ericfourfour
|
Posted: Thu Nov 16, 2006 4:45 pm Post subject: (No subject) |
|
|
Pic.SetTransparentColour sets the colour that will be made transparent when using picMerge. You need to use picMerge to have the current transparent colour appear transparent when the picture is drawn. |
|
|
|
|
|
|