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

Username:   Password: 
 RegisterRegister   
 .bmp images don't work properly
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
aaeaeeeugh




PostPosted: Wed Mar 23, 2022 8:40 am   Post subject: .bmp images don't work properly

I'm making a space invaders game with images. These images were made in Piskel, exported as png and transformed into bmp.
In the program, these images, with transparent background, are black. Just black boxes moving around.

I have my images put into variable and shown using this (Turing 4.1.1):
Turing:


var myImage :int := Pic.FileNew ("image.bmp")

Pic.Draw (myImage, x, y, picMerge)



Would anybody have a solution for this?

Thanks in advance
Sponsor
Sponsor
Sponsor
sponsor
scholarlytutor




PostPosted: Wed Mar 23, 2022 4:53 pm   Post subject: RE:.bmp images don\'t work properly

I think you might not be using the right module because that procedure from the Pic is for simple images, not ones with transparent backgrounds.

Have you tried looking at the Sprites module? I haven't used it but I believe that's what you would need.

I make my images with code using multidimensional arrays. If you're curious, feel free to look at the submissions section.
aaeaeeeugh




PostPosted: Thu Mar 24, 2022 10:52 am   Post subject: Re: .bmp images don't work properly

Those didn't work, but I tried putting a colored background and using Pic.SetTransparentColor and it worked. Thanks for answering tho!
scholarlytutor




PostPosted: Thu Mar 24, 2022 10:46 pm   Post subject: RE:.bmp images don\'t work properly

No problem, thanks for the update!
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  [ 4 Posts ]
Jump to:   


Style:  
Search: