Here's the context :
Images are made up of Pixels, which is basically an [R,G,B] array/list with R, G & B, being integers representing the colors Red, Green & Blue. So an image with MxN dimensions will have MxN [R,G,B] arrays/lists representing MxN Pixels.
I wanted to convert each of the [R,G,B] array/list into a single integer, in such a way that the single integer can be later decomposed into respective R, G & B values. Converting [R, G, B] array/list forming a pixel, into a single integer would convert the Image into matrix, on which matrix operations can be performed & later the respective elements of matrix can be decomposed into [R, G, B] values.
Is it possible through some form of weighted measure? e.g. aR + bG + cB = x