Notifications
Clear all
[Closed] script function to bitmap image
Sep 24, 2007 3:59 pm
I have found a script in the max help that reads a bitmap file, and outputs a script to Listener with a fuction this should recreate the bitmap again , the thing is Im not sure how to get the image back out again and shown in the rollout. heres the fucntion that contains a small bitmap picture could someone here point me the right way with this thanks
fn load_bitmap_smallbpm = (
local bitmap_smallbpm=bitmap 2 2
fn unpack val = for p in val collect (r=p/256^2; g=p/256-r*256; b=mod p 256; color r g b)
setpixels bitmap_smallbpm [0,0] (unpack #(14072212, 13555903))
setpixels bitmap_smallbpm [0,1] (unpack #(13228479, 12247480))
return bitmap_smallbpm
)
2 Replies
Sep 24, 2007 3:59 pm
hi Dmaxer,
the function call in the bitmap rollout item with generate it as it returns a bitmap from the function –
bitmap bmptest “” width:2 height:2 bitmap:(load_bitmap_smallbpm())