| View previous topic :: View next topic |
| Author |
Message |
soulphalanx
Joined: 22 Aug 2005 Posts: 35
|
Posted: Wed Nov 09, 2005 7:43 am Post subject: Registering a color as transparent? |
|
|
| is there a way for lua to make sprites with a fushia background be displayed with the fushia part as transparent? |
|
| Back to top |
|
 |
MasterQ
Joined: 01 Oct 2005 Posts: 7
|
Posted: Wed Nov 09, 2005 8:19 am Post subject: |
|
|
u can make a function that reads each pixel one at a time and put it to new image, but if its a certain color (in this case pink) dont draw it. thats the only way that i kno of. theres a post around here with the code, just search for it.
i dont see why you would need to use the pink tho, just make the pink part of the png transparent to begin with. |
|
| Back to top |
|
 |
soulphalanx
Joined: 22 Aug 2005 Posts: 35
|
Posted: Wed Nov 09, 2005 9:00 am Post subject: |
|
|
i have about 500 sprites with fushia backgrounds and i dont want to open every single one of them and make it transparent
is there a way to do this passively?
cause it takes a long time to load the images with function that reads each pixel and creates a new image
or is there a windows program that converts a color in an image to transparent? |
|
| Back to top |
|
 |
chaos
Joined: 10 Apr 2005 Posts: 135
|
Posted: Wed Nov 09, 2005 2:52 pm Post subject: |
|
|
paint shop pro has powerful scripting features.. you could probably write a python script to do it in 10 minutes. _________________ Chaosmachine Studios: High Quality Homebrew. |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Thu Nov 10, 2005 6:36 pm Post subject: |
|
|
| soulphalanx wrote: | | or is there a windows program that converts a color in an image to transparent? |
Yes, Lua Player can save PNGs, the Windows version, too. |
|
| Back to top |
|
 |
soulphalanx
Joined: 22 Aug 2005 Posts: 35
|
Posted: Fri Nov 11, 2005 10:07 am Post subject: |
|
|
| nvm |
|
| Back to top |
|
 |
|