RLE (.rle)
[Experimental]
Background & Context

-
- Raster image format.
- A very simple lossless data compression.
- Compresses image data using run-length encoding.
- Efficient in compressing black-and-white images.
- Plain text format.
- Superseded by other raster formats such as GIF.
Import & Export

- Import["file.rle"] imports an RLE file, returning an Image object.
- Import["file.rle",elem] imports the specified element from an RLE file.
- The import format can be specified with Import["file","RLE"] or Import["file",{"RLE",elem,…}].
- Export["file.rle",expr] exports an image, graphics and numeric arrays to an RLE file.
- Image objects are by default exported at their full raster size. Graphics and other arbitrary expressions are exported using the same raster size as their displayed form.
- See the following reference pages for full general information:
-
Import, Export import from or export to a file CloudImport, CloudExport import from or export to a cloud object ImportString, ExportString import from or export to a string ImportByteArray, ExportByteArray import from or export to a byte array
Import Elements

- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - Data representation elements:
-
"Array" initial state as a SparseArray object "Image" initial state as an Image object - Metadata elements:
-
"Comments" comments stored in the file "ImageSize" size of the imported raster - An RLE file may include additional images such as intermediate results of a cellular automaton evolution.
- Elements to access additional data:
-
"ArrayList" list of SparseArray objects "FullData" a list of associations including "Rule", "Array" and "Comments" key-value pairs "ImageCount" total number of images stored in the file "ImageList" list of Image objects
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (2)Survey of the scope of standard use cases
Import Elements (10)
Available Elements (2)
Data Representation (4)
"Array" (1)
"ArrayList" (1)
"Image" (1)
Import image data stored in a file as an Image object:
In[1]:=1

✖
https://wolfram.com/xid/06157nllp-lwg3jm
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/06157nllp-jadh3j
Out[2]=2

"ImageList" (1)
Import all the data stored in the file as Image objects:
In[1]:=1

✖
https://wolfram.com/xid/06157nllp-cqqm2u
Out[1]=1

Metadata Elements (2)
Additional Elements (2)
Export Options (2)
"Rule" (1)
In[1]:=1

✖
https://wolfram.com/xid/06157nllp-o0ehe5
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/06157nllp-pj8hpt
Out[2]=2

Import the file back to see the full data:
In[3]:=3

✖
https://wolfram.com/xid/06157nllp-nhcu6o
Out[3]=3

Specify a custom rule on export:
In[4]:=4

✖
https://wolfram.com/xid/06157nllp-hahuvv
Out[4]=4

"Comments" (1)
In[1]:=1

✖
https://wolfram.com/xid/06157nllp-7hv8z
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/06157nllp-tg0x9y
Out[2]=2

By default, no comment is stored in the file:
In[3]:=3

✖
https://wolfram.com/xid/06157nllp-ybt4bh
Out[3]=3

Specify a custom rule on export:
In[4]:=4

✖
https://wolfram.com/xid/06157nllp-6js0qv
Out[4]=4
