How do I embed GIFs in a change-set?

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

How do I embed GIFs in a change-set?

KenDickey
Ron Teitelbaum Ron at USMedRec.com wrote:

> The thing to remember is that files are just collections of bits.  You can
take the bits and convert them to a compact string, then expand that string
when you need it to create a new file.  The compact string can be placed in a
method and saved as part of a change set.  

Got it.  I had been looking for a BLOB encoding.  Thanks a bunch.
-KenD

"================Encode================="
aFileStream _ (FileStream readOnlyFileNamed: 'GIF-deck/11c.gif') binary.
aMimeStream _ Base64MimeConverter mimeEncode: aFileStream.
aString _  (Clipboard clipboardText: (aMimeStream contents)) clipboardText.

"================Decode================="
decodedStream _ (Base64MimeConverter mimeDecodeToBytes: aString readStream).
aForm _ (Form fromBinaryStream: decodedStream).

"=====check it====="
aForm asMorph openInWorld.




_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
-KenD