Re: [Numpy-discussion] dealing with RGB images

2011-08-09 Thread Nathaniel Smith
1) Have you considered using MxNx1 arrays for greyscale images, so all images have the same dimensionality? 2) Instead of defining an RGB class from scratch, would a structured dtype do what you want? - Nathaniel On Aug 9, 2011 2:23 PM, "Alex Flint" wrote: > Until now, I've been representing RGB

[Numpy-discussion] dealing with RGB images

2011-08-09 Thread Alex Flint
Until now, I've been representing RGB images in numpy using MxNx3 arrays, as returned by scipy.misc.imread and friends. However, when performing image transformations, the color dimension is semantically different from the spatial dimensions. For example, I would like to write an image scaling func