Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Transparency mask from colour vs PNG Alpha  (Read 2544 times)

0 Members and 1 Guest are viewing this topic.

Leprosy

  • Newbie
  • *
  • Posts: 7
    • View Profile
Transparency mask from colour vs PNG Alpha
« on: December 10, 2010, 01:38:28 pm »
Hey,

Just a quick question. Searched the forum and couldn't find anything, My apologies if it has been covered (I'm sure that it has).

Which would be faster when working with pixel art?
a) Setting a colour to be transparent (using CreateMaskFromColor)
b) PNG with transparency
c) Doesn't matter

I only ask because I used XNA in uni for a few months and using a lot of PNG transparency can potentially cripple a program.

Thanks a lot!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Transparency mask from colour vs PNG Alpha
« Reply #1 on: December 10, 2010, 02:31:43 pm »
It makes absolutely no difference.

PNG is more flexible since you can use any alpha value, whereas with CreateMaskFromColor it's either 100% opaque or 100% transparent.
Laurent Gomila - SFML developer

Leprosy

  • Newbie
  • *
  • Posts: 7
    • View Profile
Transparency mask from colour vs PNG Alpha
« Reply #2 on: December 10, 2010, 03:21:42 pm »
Cheers thanks.

 

anything