&rea 0 Light Poster

Hello,

I am programming an image application for my thesis.
I have got an image and I want to have the color of each pixel so I can make my own histogram. The problem is that I want to treat this histogram as an array but I don't know how to get it.I have found some functions and at the end I have the array that I was looking for but I have an error

Code:

//I create an object of color class, then I get the pixel colour and change it to string
                System::Drawing::Color^ colour;
                colour=gcnew System::Drawing::Color();
	        colour=binaryImage->GetPixel(i,j);
		System::String^ s_colour;
		s_colour=colour->ToString(); //string with colours

//change it to array
		unsigned int size=s_colour->LastIndexOf(s_colour);
		cli::array <System::Int16,1>^ array_colour;
		array_colour=gcnew cli::array<System::Int16,1>::array{size}; //ERROR 1
		s_colour->CopyTo(0,array_colour,size,bWidth*bHeight);//ERROR 2

//Histogram
                for(int a=0;a<bWidth*bHeight-1;a++)
				{
					int x=array_colour[a];	//value of the pixel
					counts[x]=counts[x]+1;
				}

ERROR 1: The constructor is not correct. I don't know how to make it rigth
ERROR 2: 'System::String::CopyTo' : cannot convert parameter 2 from 'cli::array<Type,dimension> ^' to 'cli::array<Type,dimension> ^'

Could any of you help me?perhaps there is an easiest way to obtain the array that I am looking for.
Thank you so much in advanced.