mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Move PixelFormat to the pixels crate
This commit is contained in:
parent
faee0b2b0c
commit
2c0acf6b9b
14 changed files with 38 additions and 21 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue