Move PixelFormat to the pixels crate

This commit is contained in:
Anthony Ramine 2018-11-19 10:42:50 +01:00
parent faee0b2b0c
commit 2c0acf6b9b
14 changed files with 38 additions and 21 deletions

View file

@ -4,20 +4,9 @@
use ipc_channel::ipc::IpcSharedMemory;
use piston_image::{DynamicImage, ImageFormat};
use pixels::PixelFormat;
use std::fmt;
#[derive(Clone, Copy, Debug, Deserialize, Eq, MallocSizeOf, PartialEq, Serialize)]
pub enum PixelFormat {
/// Luminance channel only
K8,
/// Luminance + alpha
KA8,
/// RGB, 8 bits per channel
RGB8,
/// RGB + alpha, 8 bits per channel
BGRA8,
}
#[derive(Clone, Deserialize, MallocSizeOf, Serialize)]
pub struct Image {
pub width: u32,