Who did use Base64 Image for Button?
global Logo_image = "...."
local ConvertClass = dotnetclass "system.convert"
local ImageClass = dotnetclass "system.drawing.image"
fn ConvertBase64StringToImage string =
(
bytearr = convertclass.FromBase64String string
memstream = dotnetobject "System.IO.MemoryStream" bytearr
DecodedImg = ImageClass.fromstream memstream
memstream.close()
DecodedImg
)
btn_image = ConvertBase64StringToImage Logo_image
button Align_Right width:45 height:45 image:#(btn_image, undefined, 1,1,1,1,1)
-----Why didn't the image show?
Comments
--First use the "Base64
.
Tools and Scripts for Autodesk 3dsMax
it is great,thank you so
it is great,thank you so much!
.
from mxs reference
Button UI Control
Parameters:
images:
An image-specification array for providing bitmap images for the button. If this is specified, the <caption> is ignored and the contents of the button are replaced with the bitmaps.
it expects array of bitmaps and not dotnetclass "system.drawing.image" image objects
.
Who did this script?