Silme94
Silme94
CC#
Created by Silme94 on 12/31/2024 in #help
BAD IMAGE QUALITY (Bitmap)
@Salman @Sehra still the same quality...
using (MemoryStream memoryStream = new MemoryStream())
{
Image controlImage = new Bitmap(pageImage.Width, pageImage.Height);

using (Graphics graphics = Graphics.FromImage(controlImage))
{
graphics.Clear(Color.White);
graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
graphics.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;

pageImage.DrawToBitmap((Bitmap)controlImage, new Rectangle(0, 0, pageImage.Width, pageImage.Height));
}

controlImage.Save(memoryStream, ImageFormat.Png);
File.WriteAllBytes(originalLocation, memoryStream.ToArray());
}
using (MemoryStream memoryStream = new MemoryStream())
{
Image controlImage = new Bitmap(pageImage.Width, pageImage.Height);

using (Graphics graphics = Graphics.FromImage(controlImage))
{
graphics.Clear(Color.White);
graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
graphics.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;

pageImage.DrawToBitmap((Bitmap)controlImage, new Rectangle(0, 0, pageImage.Width, pageImage.Height));
}

controlImage.Save(memoryStream, ImageFormat.Png);
File.WriteAllBytes(originalLocation, memoryStream.ToArray());
}
11 replies
CC#
Created by Silme94 on 12/31/2024 in #help
BAD IMAGE QUALITY (Bitmap)
No description
11 replies
CC#
Created by Silme94 on 12/31/2024 in #help
BAD IMAGE QUALITY (Bitmap)
pageImage is the PictureBox
11 replies
CC#
Created by Silme94 on 12/29/2024 in #help
✅ VS Designer load issue
thats what im actually trying to do
18 replies
CC#
Created by Silme94 on 12/29/2024 in #help
✅ VS Designer load issue
yes
18 replies
CC#
Created by Silme94 on 12/29/2024 in #help
✅ VS Designer load issue
yes
18 replies
CC#
Created by Silme94 on 12/29/2024 in #help
✅ VS Designer load issue
ok wait
18 replies
CC#
Created by Silme94 on 12/29/2024 in #help
✅ VS Designer load issue
No description
18 replies
CC#
Created by Silme94 on 12/29/2024 in #help
✅ VS Designer load issue
it does this for all forms on the project
18 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
No description
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
ok
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
nah not the issue
private void PageImage_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isDrawing = false;

//MemoryStream ms = new MemoryStream();
pageImage.Image?.Dispose();
drawingBitmap.Save("C:\\test.png"); //pageImage.ImageLocation);


}
}
private void PageImage_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isDrawing = false;

//MemoryStream ms = new MemoryStream();
pageImage.Image?.Dispose();
drawingBitmap.Save("C:\\test.png"); //pageImage.ImageLocation);


}
}
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
@Nasdack do you see anything wrong ?
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
this is full code, read the class constructor and the end of the code
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
i dont see nothing wrong
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
but i think its bc of the errors u know
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
the lines are not drawing
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
when i move the cursor its not drawingbut when i up the mouse it says the error
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
and its not even drawing anything in the two case
81 replies