Crate xyz [−] [src]
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
read |
Reads an XYZ image. |
write |
Writes an XYZ image. |
Type Definitions
Rgb |
Represents a color in RGB form. |