Registering a color as transparent?

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
soulphalanx
Posts: 35
Joined: Mon Aug 22, 2005 7:48 am

Registering a color as transparent?

Post by soulphalanx »

is there a way for lua to make sprites with a fushia background be displayed with the fushia part as transparent?
MasterQ
Posts: 7
Joined: Sat Oct 01, 2005 10:05 am

Post by MasterQ »

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.
soulphalanx
Posts: 35
Joined: Mon Aug 22, 2005 7:48 am

Post by soulphalanx »

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?
chaos
Posts: 135
Joined: Sun Apr 10, 2005 5:05 pm

Post by chaos »

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.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

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.
soulphalanx
Posts: 35
Joined: Mon Aug 22, 2005 7:48 am

Post by soulphalanx »

nvm
Post Reply