-
Notifications
You must be signed in to change notification settings - Fork 672
Closed
Labels
Description
Currently ImageBuffer uses #[derive(Debug)], which prints something like this (where every channel of every pixel is printed):
ImageBuffer {
width: 64,
height: 64,
_phantom: PhantomData,
data: [
0,
0,
0,
0,
...
0,
0,
0,
],
}
This is frustrating when debugging my own types which contain an ImageBuffer, since even a few reasonably sized images add up to tens of millions of lines of output. It would be much nicer to see something small like ImageBuffer<Rgb8>(64x64), or perhaps something like ImageBuffer(64x64x4) if we don't want to enforce a trait bound on the pixel format. I'm open to ideas over what the format should be, and I'm happy to make a PR for this. Implementation would simply be a custom Derive impl for ImageBuffer and any other image types.
fintelia, Zenithsiz and calebfletcher