Resizing image and save as PDF leads to bad results

Hello,

we have to resize an image to A4 and save as PDF.

When using Portrait Orientation all is fine. If the image is landscape and must be resized, the results are bad (blurred). We try several ResizeTypes and ImageResizeSettings combinations and options but nothing leads to acceptable results.

Please find our solution in the attachment.

Any indications or solutions which improves the output quality are welcome :slight_smile:

Kind Regards,
Andy

AsposeImageResize.zip (92,0 KB)

@AStelzner Hello! Thank you for your interest in our product. We will look into this issue and get back to you with the results as soon as possible.

@AStelzner To enhance the sharpness of resized images, we suggest adjusting your code as follows:

Please alter the PDF compression to LzwBaselinePredictor:

exportOptions.PdfCoreOptions.Compression = pdfImageCompressionOptions.LzwBaselinePredictor;

Next, we recommend changing the image resize settings mode to AdaptiveResample:

exportOptions.ImageResizeOptions.Mode = ImageResizeMode.AdaptiveResample;

If you encounter any further issues or require additional assistance, please feel free to reach out.

Hi,

thanks!

It’s not perfect yet, but a little better. :slight_smile:

Kind Regards,
Andy