So i'm trying to check each pixel of an image. It seems to work great if i separate all colors with the background color but if it's beetween 2 other colors it's not working good :
Here is my gm6 because i don't think you understand me XD :
http://s154254984.onlinehome.fr/t3.gmk
When i run it : it check all pixel of the picture (vertical line by line)
It write on a text file when a changement of color start and when it end.
But if there isn't the image background color between 2 colors, it doesn't detect well it.
Thanx a lot for any help
Edito : for peaople who can't open a gmk file, here is my main script :
repeat(width)
{
repeat(height)
{
//get the colors
r1=color_get_red(draw_getpixel(X,Y)); g1=color_get_green(draw_getpixel(X,Y)); b1=color_get_green(draw_getpixel(X,Y));
r2=color_get_red(draw_getpixel(X,Y+1)); g2=color_get_green(draw_getpixel(X,Y+1)); b2=color_get_green(draw_getpixel(X,Y+1));
Rdiff=r1-r2;Gdiff=g1-g2;Bdiff=b1-b2;
if (Rdiff>5 or Rdiff<-5 or Gdiff>5 or Gdiff<-5 or Bdiff>5 or Bdiff<-5)
{
score+=1;
col = get_hex(draw_getpixel(X,Y));
if (type='start'){type='end';YY=Y;}else{type='start';YY=Y+1;}
file_text_write_string(file,string(type)+' : '+string(X)+','+string(YY));file_text_writeln(file);
}
Y+=1;
}
Y=0
X+=1
}



Find content
Not Telling
