我正在生成带有简单文本(大小为90)的图像,如下所示:
Dim wb As Workbook
Dim r As Integer
With wb.Sheets(1)
For r = .UsedRange.Rows.Count To 1 Step -1
If IsEmpty(.Cells(r, 3)) Then
.Rows(r).Delete
End If
Next
End With
然后我使用tesseract 3读取图像。
Font font = new Font("courier new", 90);
Bitmap img = new Bitmap(500, 500);
Graphics g = Graphics.FromImage(img );
g.DrawString("Test", font, new SolidBrush(Color.White), 0, 0);
g.PageUnit = GraphicsUnit.Pixel;
img.Save("test.jpg", ImageFormat.Jpeg);
它输出64,而不是我使用的90。怎么了?如何获得原始值?