4 stable releases

1.1.0 Apr 15, 2024
1.0.2 Apr 14, 2024

#302 in Images

Download history

96 downloads per month

MIT license

1.5MB
544 lines

cf.rs

CFRS[] in Rust.

larger-image

Installation

cargo install cfrs

For library users:

cargo add cfrs

Usage

Animated GIF

cfrs out.gif '[[[[[[[[[[FS]]]]R]]RR]]RRCC]][[[[[[[[S]]]]]]]]'

flower-animated.gif

Static Images

All formats supported by image crate should work.

cfrs out.bmp '[[[[[[[[[[F]]]]R]]RR]]RRCC]]'
cfrs out.jpg '[[[[[[[[[[F]]]]R]]RR]]RRCC]]'
cfrs out.png '[[[[[[[[[[F]]]]R]]RR]]RRCC]]'
cfrs out.webp '[[[[[[[[[[F]]]]R]]RR]]RRCC]]'

flower.jpg

Image Dimensions

Default dimensions are 256x256. You can specify custom dimensions using --width and --height flags.

cfrs --width 512 --height 512 out.gif '[[CC[C[C[[[[[[[[[[[F]]]]]][[[R[[[[[[F]]R[[F]]]]]]]]]RS][[R]]]]R]]]RF]]][[[[[[[S]]]]]]]'

larger-image

Background Color

You can specify the background color using --background flag.

cfrs --background white out.bmp '[[[CR[[[[[[[[[[F]]]]FF]FF]FF]R]FF]FF]FF]FFR]FF]'

white-background.jpg

Dependencies