Here's a little stack i did way back 2 or 3 years ago to sort out this transparency format.
I sent it to Chipp bot didn't get an answer (busy guy preparing for Monterey!) and it does it in different in a different way But i never managed to work the mickey cursors correctly. Until there's color in them that is, i'd rather wait than live in a b/w world. But the cool thing about it is the "text" based editor ;) After a few crashes and hardly any success making it work, i gave up... go URL "http://monsieurx.com/hyper/stacks/MickeyHandCursor.rev" The name is because of the cursors i wanted to use in XOS at the time. ;) cheers Xav > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of jbv > Sent: Thursday, May 05, 2005 13:05 > To: How to use Revolution > Subject: Re: Quick Demo stack for creating Transpanrecy effect. > > > Chipp, > > I was wrong : you can't set transparent pixels using the "replace" > function (actually I thought that the 1st byte of each pixel > was used for the alpha channel, but it's just zero). > > But you can try the following script which uses the offset function. > With the image in your example, it's roughly 28 times faster : > > on mouseUp > set cursor to watch > lock screen > put binaryEncode("C",0) into a > put a into b > repeat 3 times > put binaryEncode("C",255) after a > end repeat > > put imagedata of img 2 into IMD > put alphadata of img 2 into AD > put 0 into sk > repeat forever > put offset(a,IMD,sk) into c > if c=0 then > exit repeat > else > add c+3 to sk > put b into char sk/4 of AD > end if > end repeat > set alphadata of img 2 to AD > end mouseUp > > JB > > > Chipp, > > > > one more question : have you tried to use the replace function for > > groups of 4 bytes in the imagedata to speed up things, instead of > > checking binary values in the imagedata and then setting > each byte of > > the alphadata ? > > > > best, > > JB > > > > > Helping out a friend, I did this. It could be good for a > number of > > > things including: > > > > > > Creating cursors > > > Creating transparent GIFs > > > etc.. > > > > > > in the messagebox: > > > > > > go URL > "http://www.altuit.com/webs/altuit2/RunRev/altMakeTrans.rev" > > > > > > altMakeTransparent > > > This is a small demo stack which has a neat function > which can make > > > a specific color transparent in an image. > > > > > > The demo makes all white pixels transparent. The function > is in the > > > script of the button, "Make White Transparent" > > > > > > -Chipp > > > > > > _______________________________________________ > > > use-revolution mailing list > > > [email protected] > > > http://lists.runrev.com/mailman/listinfo/use-revolution > > > > _______________________________________________ > > use-revolution mailing list > > [email protected] > > http://lists.runrev.com/mailman/listinfo/use-revolution > > _______________________________________________ > use-revolution mailing list > [email protected] > http://lists.runrev.com/mailman/listinfo/use-revolution > _______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
