//изменение контрастности private void trackBar2_Scroll(object sender, EventArgs e) { if (Form1.full_name_of_image != "\0") { UInt32 p; for (int i = 0; i < Form1.image.Height; i++) { for (int j = 0; j < Form1.image.Width; j++) { p = BrightnessContrast.Contrast(Form1.pixel[i, j], trackBar2.Value, trackBar2.Maximum); Form1.FromOnePixelToBitmap(i, j, p); } } FromBitmapToScreen(); } }