Creates a new bitmap cast member from a pre-existing bitmap.
--newBmpFromMem (original member, new width, new height, new depth, new member cast position, new member cast name)
--Creates a new bitmap cast member from a pre-existing bitmap.
--origMem - member reference of original bitmap to copy from
--wide - width of new bitmap, if 0 then the width of the original is used
--high - height of new bitmap, if 0 then the heoght of the original is used
--deep - colordepth of the new bitmap, if 0 then 32 is used, if #grayscale is used a new 8 bit grayscale version of the original is created
--newMem - number of the new castmember to create. If 0 then 1st available empty cast slot is used
--cName - name of castLib to place new bitmap into. If "" then internal is used
--returns 1 if successfull, 0 otherwise.
--Director 8 image manipulation routines.
--(c) 2000, Dave Mennenoh
--dmennenoh@hotmail.com
--newBmpFromMem (original member, new width, new height, new depth, new member cast position, new member cast name)
--Creates a new bitmap cast member from a pre-existing bitmap.
--origMem - member reference of original bitmap to copy from
--wide - width of new bitmap, if 0 then the width of the original is used
--high - height of new bitmap, if 0 then the heoght of the original is used
--deep - colordepth of the new bitmap, if 0 then 32 is used, if #grayscale is used a new 8 bit grayscale version of the original is created
--newMem - number of the new castmember to create. If 0 then 1st available empty cast slot is used
--cName - name of castLib to place new bitmap into. If "" then internal is used
--returns 1 if successfull, 0 otherwise.
on newBmpFromMem origMem,wide,high,deep,newMem,cName
typ=origMem.type
okTyp=[#bitmap,#text,#vectorShape]
if getPos(okTyp,typ) then
if not wide then wide=origMem.width
if not high then high=origMem.height
gFlag=0
if deep=#grayScale then
deep=8
gFlag=1
end if
if not deep then deep=32
if cName="" then cName="internal"
if gFlag then
newIm=image(wide,high,deep,#grayScale)
else
newIm=image(wide,high,deep)
end if