Expand description
Reader and writer for the RPG Maker XYZ image format.
§Example
This library works well with the image
crate.
Here’s an example of reading an XYZ image into an ImageBuffer
:
ⓘ
extern crate image;
extern crate xyz;
use image::RgbImage;
use std::fs::File;
let file = try!(File::open("boat2.xyz"));
let raw = try!(xyz::read(&mut file));
let boat = RgbImage::from_raw(raw.width as u32, raw.height as u32, raw.to_rgb_buffer());
You can then do something useful with the boat
.
Structs§
- Image
- Represents an XYZ image.
Functions§
Type Aliases§
- Rgb
- Represents a color in RGB form.