For making the colors bolder and the font clearer, you could try the following code.
The code of xaml:
float contrast = 1f;
float gamma = 8.5f;
private Bitmap MakeGrayscaleWithColorMatrix(Bitmap original)
{
Bitmap newBitmap = new Bitmap(original.Width, original.Height);
Graphics g = Graphics.FromImage(newBitmap);
ColorMatrix colorMatrix = new ColorMatrix(
new float[][]
{
new float[] { contrast, 0, 0, 0, 0},
new float[] {0, contrast, 0, 0, 0},
new float[] { 0, 0f, contrast, 0, 0},
new float[] {0, 0, 0, 1, 0},
new float[] {0, 0, 0, 0, 1}
}) ;
ImageAttributes attributes = new ImageAttributes();
attributes.SetColorMatrix(colorMatrix,ColorMatrixFlag.Default,ColorAdjustType.Bitmap);
attributes.SetGamma(gamma,ColorAdjustType.Bitmap);
g.DrawImage(original, new Rectangle(0, 0, original.Width, original.Height),
0, 0, original.Width, original.Height, GraphicsUnit.Pixel, attributes);
g.Dispose();
return newBitmap;
}
The picture of result:
You can also refer to the links(https://stackoverflow.com/questions/55849048/resize-bitmap-image-and-make-bolder-lines and https://stackoverflow.com/questions/34116706/how-to-repair-dimmed-image-of-book-page/34121073#34121073 ) for more.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our [documentation][3] to enable e-mail notifications if you want to receive the related email notification for this thread.
[3]: https://learn.microsoft.com/en-us/answers/articles/67444/email-notifications.html