Convert [M, N, P] slice to MxN slice of P arrays.
// dfmt off Slice!(double*, 3) rgb = [ 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.470588, 0.470588, 0.470588 ].sliced(4, 1, 3); // dfmt on auto packed = pixelPack!3(rgb); assert(packed.shape == [4 * 1]); assert(packed[0].length == 3);
See Implementation
Convert [M, N, P] slice to MxN slice of P arrays.