I have extracted the pdf page as an image by using the below code snippet,but on changing the size of the bitmap the text content in the image is not sharp ,it i s blurry
Can you suggest a solution for improving the quality of the rendered image.
var data = bitmapImage.LockBits(new Rectangle(0, 0, Width, Height), ImageLockMode.ReadWrite, bitmapImage.PixelFormat);
int bytes = Math.Abs(data.Stride) * bitmapImage.Height;
var createdpages = PdfiumViewer.FPDFBitmap_CreateEx(Width, Height, 4, data.Scan0, bitmapImage.Width * 4);
uint background = (flags & PdfiumNative.PdfRenderFlags.Transparent) == 0 ? 0xFFFFFFFF : 0x00FFFFFF;
PdfiumViewer.FPDFBitmap_FillRect(createdpages, 0, 0, Width, Height, background);
PdfiumViewer.FPDF_RenderPageBitmap(createdpages, pages, 0, 0, Width, Height, 0, 0);
Kindly provide a solution for rendering the image with shapness.