C#C
C#3y ago
pirik3

saving image from panel.

im trying to save image from buffer panel but i can only managed to save entire window but i just want to save image, with my way if i zoomed on image than click to save it will be saved as how i zommed but i need just actuall image. so my way was;

int width = imageEditor.Size.Width;
int height = imageEditor.Size.Height;

Bitmap bm = new Bitmap(width, height);
imageEditor.DrawToBitmap(bm, new Rectangle(0, 0, width, height));

bm.Save(@"C:\Users\asd\Desktop\test1.jpeg", ImageFormat.Jpeg);


so how do i take image from imageeditor.bufferPanel named on the source or picture.
Screenshot_2023-11-12_022214.png
Was this page helpful?