TTMSFNCButton image from stream

i want to set image of a TTMSFNCButton from a memory stream.

MyBut.Bitmap.LoadFromStream(MyStream) ;
but i got error

raised exception class EEncodingError with message 'No mapping for the Unicode character exists in the target multi-byte code page'.

Is the stream containing valid image data?

yes

it is a TMemoryStream

and i can set a timage with this

myImage.MultiResBitmap.Add.Bitmap.LoadFromStream(MyStream) ;

Can you attach the file?

test.zip (87.2 KB)