|REBOL 3 Docs||Guide||Concepts||Functions||Datatypes||Errors|
|TOC < Back Next >||Updated: 21-Aug-2010 Edit History|
Decodes a series of bytes into the related datatype (e.g. image!).
type [word!] - Media type (jpeg, png, etc.)
data [binary!] - The data to decode
Used to call codecs to decode binary data (bytes) into related datatypes.
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.
image: load %photo.jpg
is roughly equivalent to:
data: read %photo.jpg ; returns binary data image: decode 'jpeg data
|TOC < Back Next >||REBOL.com - WIP Wiki||Feedback Admin|