Write image to a vector of bytes (in memory write)

cargo test passes
This commit is contained in:
Nathan Fiedler
2015-06-09 22:18:57 -07:00
parent 78d681608d
commit 56877aaad3
3 changed files with 61 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# magick-rust
A "safe" Rust interface to the [ImageMagick](http://www.imagemagick.org/) system, in particular, the MagickWand library. The *safe* is in scarequotes because honestly nearly everything is little more than calls into a C library with `unsafe` wrapped around it.
A "safe" Rust interface to the [ImageMagick](http://www.imagemagick.org/) system, in particular, the MagickWand library. The word *safe* is in scarequotes because, honestly, nearly everything is little more than a call into a C function with `unsafe` wrapped around it.
## TODO
@ -9,9 +9,18 @@ A "safe" Rust interface to the [ImageMagick](http://www.imagemagick.org/) system
1. Develop Rustic wrappers to the MagickWand library.
* Old Rust bindings: https://github.com/influenza/wand-of-rust
* Wand API: http://www.imagemagick.org/script/magick-wand.php
1. Write unit tests
1. ~~Write unit tests~~
1. Test it on lots of images in batches to stress test it; should not crash
## Build and Test
Pretty simple for now.
```
$ cargo build
$ cargo test
```
## Generating Bindings
To generate the ImageMagick bindings, we use [rust-bindgen](https://github.com/crabtw/rust-bindgen), which reads the C header files and produces a suitable wrapper in Rust.