# Revision history [back]

Hi!

If you are loading a Gray scale image as a Color image. You can check that by Comparing RGB Values of All the pixels. For Example If the image is a Gray Scale image then

if(R=G=B)
//Grayscale


For more accurate results you can introduce some thresholds values. i.e

if((abs(R-G)< Threshold))// Threshold-> can be greater than zero. eg 0.006
//Grayscale


By this way you can get pretty good results.