vector type conversion (assignment)

In messing around with my code I wanted to try and read two pixels from global memory in one read and work on each pixel individually in the kernel. Something like this:

	uint2 pixels =  imgData[idx];
	uchar4 pixelA = pixels.x;
	uchar4 pixelB = pixels.y;

which results in the following:
error : no suitable constructor exists to convert from “unsigned int” to “uchar4”

I take pixels.x to be 4 bytes just like uchar4. I must me overlooking some simple, low overhead, way of doing this… How?

Thanks,
Andrei

In messing around with my code I wanted to try and read two pixels from global memory in one read and work on each pixel individually in the kernel. Something like this:

	uint2 pixels =  imgData[idx];
	uchar4 pixelA = pixels.x;
	uchar4 pixelB = pixels.y;

which results in the following:
error : no suitable constructor exists to convert from “unsigned int” to “uchar4”

I take pixels.x to be 4 bytes just like uchar4. I must me overlooking some simple, low overhead, way of doing this… How?

Thanks,
Andrei