Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
ILBM
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Compression ==== If an image is compressed, each row of data (but not each bitplane) is compressed individually, including the mask data if present. The compression is a variety of [[RLE Compression]] using flags. It can be decoded as follows:<ref name="ilbm_spec"/> * Loop until we have [Final length] bytes worth of data (final length calculated from image size.) * While [Decompressed data length] < [Final length]: *# Read a byte [Value] *# If [Value] > 128, then: *#* Read the next byte and output it (257 - [Value]) times. *#* Move forward 2 bytes and return to step 1. *# Else if [Value] < 128, then: *#* Read and output the next [value + 1] bytes *#* Move forward [Value + 2] bytes and return to step 1. *# Else [Value] = 128, exit the loop (stop decompressing) For the compression routine, it's best to encode a 2 byte repeat run as a replicate run except when preceded and followed by a literal run, in which case it is best to merge the three into one literal run. Always encode >3 byte repeats as replicate runs.<ref name="ilbm_spec"/>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)