Impl byte size function for Color (#1141)

This commit is contained in:
Dennis Kobert 2023-04-17 09:58:21 +02:00 committed by Keavon Chambers
parent 974a37f127
commit a1b63811ba

View file

@ -60,6 +60,9 @@ impl Pixel for Color {
fn from_bytes(bytes: &[u8]) -> Self {
Color::from_rgba8_srgb(bytes[0], bytes[1], bytes[2], bytes[3])
}
fn byte_size() -> usize {
4
}
}
impl Alpha for Color {