Two method parameter (Bitmap) points same image

  • Thread starter Thread starter MustafaUysal
  • Start date Start date
M

MustafaUysal

Guest
Hi,

i have a method which performs something about image processing. I need two inputs. But when i run my code, i see that two images are same. But i choose (i think) two different images. I don't know what is the problem.

my main function

private void sliderKernel_MouseUp(object sender, MouseEventArgs e)
{
Filtreler f1 = new Filtreler();
f1.Img = new Bitmap(pBox_SOURCE.Image);
int SablonBoyutu = sliderKernel.Value;

Bitmap MeanImg = (Bitmap)f1.Img.Clone();
f1.meanfilter(SablonBoyutu, MeanImg);
pBox_PROCESSED.Image = MeanImg;

Bitmap Shade = (Bitmap)MeanImg.Clone();
f1.CorrectShade(f1.Img, Shade); //troubled method
pBoxShadeCorrection.Image = Shade;
}

my method

public void CorrectShade(Bitmap GirisResmi, Bitmap BulanikResim)
{
int ResimGenisligi = GirisResmi.Width;
int ResimYuksekligi = GirisResmi.Height;
int x, y, k = 1;
for (x = 0; x < ResimGenisligi; x++)
{
for (y = 0; y < ResimYuksekligi; y++)
{
//some operations
}
}
return;
}




and my property

public Bitmap Img { get; set; }

public Color OkunanRenk { get; set; }

Continue reading...
 

Similar threads

Back
Top