REBOL 3 Docs | Guide | Concepts | Functions | Datatypes | Errors |
TOC < Back Next > | Updated: 21-Aug-2010 Edit History |
Encodes a datatype (e.g. image!) into a series of bytes.
Arguments:
type [word!] - Media type (jpeg, png, etc.)
data [image! binary! string!] - The data to encode
Refinements:
/options
opts [block!] - Special encoding options
See also:
Used to call codecs to encode datatypes into binary data (bytes).
Codecs are identified by words that symbolize their types. For example the word png is used to identify the PNG codec.
See the system/codecs for a list of loaded codecs. Codecs can be native (built-in), externally loaded, or even coded in REBOL.
The line:
save %photo.bmp image
Is roughly equivalent to:
data: encode 'bmp image write %photo.bmp data
TOC < Back Next > | REBOL.com - WIP Wiki | Feedback Admin |