LightDiv];  if (Sum > width * height / 000) break;  }  // Calculating MinLight and MaxLight for 'Sub':  Sum = 0;  for (MinLightSub = 0; MinLightSub < 000; MinLightSub++)  {  Sum += histoSub[MinLightSub];  if (Sum > width * height / 000) break;  }  Sum = 0;  for (MaxLightSub = 000; MaxLightSub >= 0; MaxLightSub--)  {  Sum += histoSub[MaxLightSub];  if (Sum > width * height / 000) break;  }  // Calculating MinLight and MaxLight for 'Sub':  Sum = 0;  for (MinLightSub = 0; MinLightSub < 000; MinLightSub++)  {  Sum += histoSub[MinLightSub];  if (Sum > width * height / 000) break;  }  Sum = 0;  for (MaxLightSub = 000; MaxLightSub >= 0; MaxLightSub--)  {  Sum += histoSub[MaxLightSub];  if (Sum > width * height / 000) break;  }  // Calculating 