不要使用比您需要,只是因为您可以在HTML中设置宽度和高度的一大图像。
Don't use a bigger image than you need just because you can set the width and height in HTML. If you need.
在这个函数的第一部分中,您设置了创建报告需要的对象,比如画布的宽度和高度以及填充变量。
In the first section of this function, you set up objects needed to create the report, like the width and height of the canvas, as well as padding variables.
图像的高度和宽度的最大值被设置为 150 像素,但是保持高宽比例不变,因此图像没有变形。
The height and width are maxed out at 150 pixels, but the ratio of the height-to-width is preserved so the images are not distorted.
应用推荐