forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Registering a color as transparent?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
soulphalanx



Joined: 22 Aug 2005
Posts: 35

PostPosted: Wed Nov 09, 2005 7:43 am    Post subject: Registering a color as transparent? Reply with quote

is there a way for lua to make sprites with a fushia background be displayed with the fushia part as transparent?
Back to top
View user's profile Send private message
MasterQ



Joined: 01 Oct 2005
Posts: 7

PostPosted: Wed Nov 09, 2005 8:19 am    Post subject: Reply with quote

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
View user's profile Send private message
soulphalanx



Joined: 22 Aug 2005
Posts: 35

PostPosted: Wed Nov 09, 2005 9:00 am    Post subject: Reply with quote

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
View user's profile Send private message
chaos



Joined: 10 Apr 2005
Posts: 135

PostPosted: Wed Nov 09, 2005 2:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Thu Nov 10, 2005 6:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
soulphalanx



Joined: 22 Aug 2005
Posts: 35

PostPosted: Fri Nov 11, 2005 10:07 am    Post subject: Reply with quote

nvm
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group