Picture from string?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Picture from string?

Günther Schmidt
Hi,

is there a way to load a picture from a String?

OLEPicture loads from file, but how do I create an image from something
I got out of a database?

Günther


Reply | Threaded
Open this post in threaded view
|

Re: Picture from string?

Christopher J. Demers
"Günther Schmidt" <[hidden email]> wrote in message
news:42c42813$[hidden email]...
> is there a way to load a picture from a String?
>
> OLEPicture loads from file, but how do I create an image from something I
> got out of a database?

This is the method I implemented on the class side of OLEPicture for that
purpose.
===========
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.
===========

Chris