❔ Do Transparent All White Pixcel

BBurakD.2/19/2023
private void button3_Click(object sender, EventArgs e)
{
// Bir resim seçme işlemi
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "Resim Dosyaları|.jpg;.jpeg;.png;";
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
// Resmi bir bitmap olarak yükleme
Bitmap bitmap = new Bitmap(openFileDialog.FileName);
for (int x = 0; x < bitmap.Width; x++)
{
for (int y = 0; y < bitmap.Height; y++)
{
// Pikselin rengini kontrol etme
Color pixelColor = bitmap.GetPixel(x, y);
if (pixelColor.R == 255 && pixelColor.G == 255 && pixelColor.B == 255)
{
// Pikseli siyah yapma
bitmap.SetPixel(x, y, Color.Transparent);


}
}
// Değiştirilmiş resmi kaydetme

}
pictureBox1.Image = bitmap;
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "Resim Dosyaları|
.jpg;.jpeg;.png;";
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
bitmap.Save(saveFileDialog.FileName);

}
}
}
}
BBurakD.2/19/2023
What should be transparent turns white
BBurakD.2/19/2023
help please
AAccord2/20/2023
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.