Answer the question
In order to leave comments, you need to log in
How to deal with loss of image details after saving (.NET Bitmap)?
I save images to disk, the same image can be of different resolutions.
In case of sufficient resolution, the image does not lose details:
At a lower resolution, details are lost after saving:
Are there any algorithms for saving in such a way that at least 1px wide lines remain?
Answer the question
In order to leave comments, you need to log in
Depends on what format you save the image in. If you need lossless, then I recommend using the PNG format.
Do you resize through System.Drawing.Graphics? Try playing with SmoothingMode, InterpolationMode, PixelOffsetMode:
var newBmp = new Bitmap(newWidth, newHeight);
using (Graphics g = Graphics.FromImage(newBmp)) {
g.SmoothingMode = SmoothingMode.HighQuality;
g.InterpolationMode = InterpolationMode.HighQualityBicubic; // или HighQualityBilinear
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.DrawImage(oldBmp, new Rectangle(0, 0, newWidth, newHeight));
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question