Here is a little test code:
=====================
fs := FileStream read: 'D:\test\test.jpg' text: false
op := OLEPicture fromByteArray: fs contents.
shell := Shell show.
op drawOn: shell view canvas.
=====================
Here are the methods I added:
=====================
!OLEPicture class methodsFor!
fromByteArray: byteArray
"cdemers - 12-11-2001 Return a new OLEPicture based on byteArray."
^super new loadFromByteArray: byteArray.! !
!OLEPicture class categoriesFor: #fromByteArray:!*-unclassified!public! !
!OLEPicture methodsFor!
loadFromByteArray: byteArray
"cdmers 12-5-2001 Load from byteArray."
| is |
is := IStream onHGLOBAL.
is nextPutAll: byteArray.
is position: 0.
picture := IPicture readFromIStream: is.
is free.
self realize.! !
!OLEPicture categoriesFor: #loadFromByteArray:!*-unclassified!public! !
=====================
Chris