pixel method
Implementation
List<num> pixel(int x, int y) {
final stride = _width * _channels;
final offset = y * stride + x * _channels;
return switch (dtype) {
StbiDType.u8 => (ptr.cast<ffi.Uint8>() + offset).asTypedList(_channels),
StbiDType.u16 => (ptr.cast<ffi.Uint16>() + offset).asTypedList(_channels),
StbiDType.f32 => (ptr.cast<ffi.Float>() + offset).asTypedList(_channels),
};
}