Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Transparent Picture Background/No Picture Background
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
SAValkyrie




PostPosted: Sat Jan 12, 2013 4:50 pm   Post subject: Transparent Picture Background/No Picture Background

So we are importing a bomberman explosion picture into our game. You know for every picture there are background right? Such as white, blue, etc. So we cropped that part out in photoshop and left it black. However when we saved a picture and imported into turing, the blank background that we cropped out reappears in the game, and we can see this ugly dotted botch stuff in our game execution menu. So we tried using Pic.SetTrasparentColour but we did not know how to make it work. So I was just wondering is there a way to make a white background make transparent or disappear when we import that picture into our game coding.
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Sat Jan 12, 2013 4:56 pm   Post subject: RE:Transparent Picture Background/No Picture Background

Open the image in paint and pick your background color. Ideally, a color that isn't anywhere else in the image. Fill in all your background areas with this color, and save a .bmp. Most other formats will introduce compression artifacts into your image, and you'll end up with the ugly dotted botch stuff.

Once you've loaded your image in Turing (Pic.Load(), if I remember correctly), use Pic.SetTransparentColor(your_variable, background_color). When you draw your image, instead of using picCopy, use picMerge.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: