如何防止Microsoft Report Viewer报告中的“锯齿状”PNG图像(别名)(PDF)

时间:2022-03-10 21:04:58

I have a PNG image (a triangle) which has the dimensions 200*200 pixels. As per Paint.NET this corresponds to 5.29*5.29cm.

我有一个PNG图像(三角形),其尺寸为200 * 200像素。根据Paint.NET,这相当于5.29 * 5.29cm。

When I position this image in the Microsoft Report Viewer Report in my WPF application, the slanted sides are serrated and not smooth as in the PNG image.

当我将此图像放在我的WPF应用程序中的Microsoft报表查看器报表中时,倾斜的边是锯齿状的,而不像PNG图像那样平滑。

How can I ensure that the image is not "serrated" (aliased) in the Microsoft Report Viewer Report

如何确保Microsoft Report Viewer报告中的图像不是“锯齿状”(别名)

UPDATE: The same report when saved as TIFF does not show aliasing in the image. Does the saving as PDF cause the loss in quality of the external image?

更新:保存为TIFF时的相同报告不会在图像中显示别名。以PDF格式保存是否会导致外部图像质量下降?

Function used: http://msdn.microsoft.com/en-us/library/ms252131(v=vs.100).aspx

使用的函数:http://msdn.microsoft.com/en-us/library/ms252131(v = vs.100).aspx

UPDATE: Sample application with issue: http://1drv.ms/1hRcCFi

更新:问题的示例应用程序:http://1drv.ms/1hRcCFi

1 个解决方案

#1


3  

The problem was solved by replacing the "Transparent" to "White" in the background of the image used.

通过在所使用的图像的背景中将“透明”替换为“白色”来解决该问题。

ReportViewer seems to have an issue with images using transparency.

ReportViewer似乎有使用透明度的图像问题。

#1


3  

The problem was solved by replacing the "Transparent" to "White" in the background of the image used.

通过在所使用的图像的背景中将“透明”替换为“白色”来解决该问题。

ReportViewer seems to have an issue with images using transparency.

ReportViewer似乎有使用透明度的图像问题。