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

Username:   Password: 
 RegisterRegister   
 Image Fading
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Martin




PostPosted: Tue Apr 22, 2003 3:28 pm   Post subject: Image Fading

Anyone know how to fade an image into another image?
Sponsor
Sponsor
Sponsor
sponsor
Catalyst




PostPosted: Tue Apr 22, 2003 3:50 pm   Post subject: (No subject)

yes i do, the pic flashlight in source that i made should help, it has some algorithms for blending colors at a certain % (the algorithms are imbedded in the prog tho) unless you make a prog that precalcs or composes the images for u it might be slow. U could always try with smaller images tho
Tony




PostPosted: Tue Apr 22, 2003 6:02 pm   Post subject: (No subject)

well (0,0,0) is black, right? So you just do RGB what color (or something) for each pixel and reduce its values closer to pure black, keeping the ratios the same though.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Catalyst




PostPosted: Tue Apr 22, 2003 6:03 pm   Post subject: (No subject)

he want to fade to another image, not just black (i assume he also doesnt want to fade from the image to black to another image)
Tony




PostPosted: Tue Apr 22, 2003 6:08 pm   Post subject: (No subject)

ah, yes... sorry, I was thinking of something else...

but its the same... just gradually move from one RGB value to the next. Find the difference between each of 3 colors, divide that by number of steps you want to take to fade and increase RGB by that each time through the loop. Same as to black really
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Martin




PostPosted: Tue Apr 22, 2003 6:53 pm   Post subject: (No subject)

Thanks guys, I think I can get this to work...making a crazy menu system for my end of the year project
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  [ 6 Posts ]
Jump to:   


Style:  
Search: