---
name: "RLE_SPRITE"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/RLE_SPRITE"
---

# RLE\_SPRITE(3alleg)

Stores the contents of an RLE sprite. Allegro game programming library.

## NAME

RLE\_SPRITE - Stores the contents of an RLE sprite. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**typedef struct RLE\_SPRITE**

## DESCRIPTION

```
   int w, h;           - width and height in pixels
   int color_depth;    - color depth of the image
```

RLE sprites store the image in a simple run-length encoded format, where repeated zero pixels are replaced by a single length count, and strings of non-zero pixels are preceded by a counter giving the length of the solid run. Read chapter "RLE sprites" for a description of the restrictions and how to obtain/use this structure.

## SEE ALSO

[**get\_rle\_sprite**(3alleg)](/get_rle_sprite/3alleg.md), [**BITMAP**(3alleg)](/BITMAP/3alleg.md), [**COMPILED\_SPRITE**(3alleg)](/COMPILED_SPRITE/3alleg.md)
