Here's a script I wrote a while ago that changes the bit depth of a
500x500 pixels image, called "rasterbg". I'm sure you are able to
modify it to your needs:
-------------------------------------
on exitFrame me
put member("rasterbg").depth
changeTheDepth()
put member("rasterbg").depth
end
on changeTheDepth me
myImageBuffer = image(500, 500, 8) -- Grimmwerks: change dimensions
to fit your image member, 8 is the desired bit depth
myImageBuffer.copyPixels(member("rasterbg").image,
rect(0,0,500,500), rect(0,0,500,500))
member("rasterbg").image = myImageBuffer
end
-------------------------------------
Watch out for emailer-introduced line breaks!
If you *don't* use this script, make sure to use the offscreen image
buffer method anyway.
To copyPixels from one member to another directly is usually *way*
slower than storing the image data in an offscreen buffer, and then
assign the whole buffer to the image member at once.
In this particular case I'm not sure, as you do everything in one
sweep, but if you make more than one change to an image member, it
has to update the screen for every change -> sloooow.
-Andreas
>I'm ready about the new imaging lingo and just tooling around a tad....I
>know that depth can be tested but not set -- however, is there a way to
>change the depth of a member some other way?
>
>My guess is something along the lines of creating an image at a lower
>depth and then copyPixels to that one from the higher depth.......er......
>
>--------------------[ http://www.grimmWERKS.com ]------------------
> [ graphic design -|- sound design -|- shockwave -|- lingo -|- cdrom ]
>
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
>email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]