https://github.com/emmabritton/ici-files
Indexed color image files
https://github.com/emmabritton/ici-files
pixels rust rust-library simple-graphics
Last synced: 3 months ago
JSON representation
Indexed color image files
- Host: GitHub
- URL: https://github.com/emmabritton/ici-files
- Owner: emmabritton
- License: mit
- Created: 2023-02-26T17:24:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-01T06:45:06.000Z (about 1 year ago)
- Last Synced: 2025-12-13T21:49:00.232Z (7 months ago)
- Topics: pixels, rust, rust-library, simple-graphics
- Language: Rust
- Homepage:
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://crates.io/crates/ici-files "Crates.io version")
[](https://docs.rs/ici-files "Documentation")
# ICI Files
## Usage
```toml
ici-files = "0.4.1"
```
Encodes and decodes ICI files and JASC palettes
Designed to be used with [Buffer Graphics](https://github.com/emmabritton/ici-files), and in turn [Pixel Graphics](https://github.com/emmabritton/pixel-graphics-lib).
[ICI Tools](https://github.com/emmabritton/ici_tools) can be useful when working with ICI files
[ICI Image editor](https://github.com/emmabritton/ici-image-editor) is a MSPaint like program for ICI and ICA files
Indexed Color Images come in two forms:
1. Single
2. Animated
Both may contain palette data in one of these forms:
1. No palette data
2. Palette ID (u16)
3. Palette Name (String 1..=255)
4. Palette Colours (RGBA 1..=255)
## Palettes
#### No Data
The file doesn't contain any palette information. The `Image` struct will default to a palette of the correct size but filled with transparency.
Use `Image::with_palette` to set the palette or `Image::set_color` to set a specific color.
#### ID
The file has a palette ID between 0..=65535. The `Image` struct will default to a palette of the correct size but filled with transparency.
Use `Image::with_palette` to set the palette or `Image::set_color` to set a specific color.
#### Name
The file has a UTF-8 palette name, between 1..=255 bytes long. The `Image` struct will default to a palette of the correct size but filled with transparency.
Use `Image::with_palette` to set the palette or `Image::set_color` to set a specific color.
#### Colors
The file contains a list of RGBA colors.
## Image formats
### Single
Single static image, max width and height is 255
### Animated
Multi frame image, max width, height and frame count is 255.
Also contains a frame rate as fractional seconds per frame.
All frames must be the same size.
#### IndexedWrapper
Stores either a static or animated image and provides a limited abstract interface
## Features
> Default: `serde`
#### Serde
Adds serialize and deserialize to some structs