From a1b63811ba91d2bfe328861935e72dd64b0c5a75 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Mon, 17 Apr 2023 09:58:21 +0200 Subject: [PATCH] Impl byte size function for Color (#1141) --- node-graph/gcore/src/raster/color.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/node-graph/gcore/src/raster/color.rs b/node-graph/gcore/src/raster/color.rs index 276b1a2f..129bf16f 100644 --- a/node-graph/gcore/src/raster/color.rs +++ b/node-graph/gcore/src/raster/color.rs @@ -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 {