Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: alpha image blending...

From: cyphre:seznam:cz at: 23-Jul-2003 18:20

Hi Max again, Have a look at Using this function you can draw into alphachannel using any DRAW command(so also using a pictures) but it is not so fast as native implementation could be (I requested possibility to draw/load images into alphachannel but this is probably still on RTs huge todo list) I have quickly hacked-up another way how to make alphachannel from image fastly but this need preprocessed(in some gfx program or slowly using Rebol) 8-bit greyscale bitmap: -------------------------start of the code(watch out line breaks!)---------------------------------- REBOL [ title: "use 256grayscale image for alphachannel" author: [cyphre--seznam--cz] ] site: ;you can write your own to-8-bit-gryscale-bitmap converter in Rebol but it will be slow IMO ;so I exported the raw bitmap data form Photoshop for example bay-alpha: read-thru site/bay-greyscale.raw ;this is normal raw 8-bit grayscale bitmap img: to-image make face [ size: 192x144 ;size of the original bay image color: blue edge: none effect: [gradient -1x-1 255.0.0 0.0.255] ] img-tmp: to-block mold img append/only img-tmp/3 bay-alpha img2: do bind img-tmp 'system view layout [backcolor green image img image img2] ------------------------end of code------------------------------------------- regards, Cyphre ----- Original Message ----- From: "Maxim Olivier-Adlhoch" <[maximo--meteorstudios--com]> To: <[rebol-list--rebol--com]> Sent: Wednesday, July 23, 2003 4:33 PM Subject: [REBOL] Re: alpha image blending... I was waiting for a reply from you... thanks for the alphamul example. can we alphamul with another image? -max ----------- meteor Studios, T.D. ----------- Strong enough for a man, but made for a woman