屏幕截图:
尝试在MS Access 2010中的IE Web浏览器控件中显示大图像(大于5000x5000)时,不会显示图像。
我正在使用VBA来导航和写入对象文档的内容。我测试了这两种方法,并得到了相同的结果。较小的图像渲染没有问题。
LE 这是代码:
Private Sub DisplayImg(bWrite As Boolean)
Dim sHTMLFilePath As String
Dim sImageFilePath As String
Dim sContent As String
sImageFilePath = "d:\img.png"
sHTMLFilePath = "d:\html.html"
sContent = "<html>"
sContent = sContent & vbCrLf & "<head>"
sContent = sContent & vbCrLf & "</head>"
sContent = sContent & vbCrLf & "<style>"
sContent = sContent & vbCrLf & GetCSS ' gets css from db
sContent = sContent & vbCrLf & "</style>"
sContent = sContent & vbCrLf & "<body>"
sContent = sContent & vbCrLf & "<img class=" & Chr(34) & "img_wb" & Chr(34) & " src=" & Chr(34) & sImageFilePath & Chr(34) & ">"
sContent = sContent & vbCrLf & "</body>"
sContent = sContent & vbCrLf & "</html>"
If bWrite = False Then ' navigate
Call CreateNewTextFile(sHTMLFilePath, sContent) ' creates the html file
Me.wb.navigate sHTMLFilePath
Else ' write
Me.wb.Document.Clear
Me.wb.Document.write sContent
Me.wb.Document.Close
End If
End Sub
答案 0 :(得分:0)
我在GoDaddy的帮助下发现了这个: &#34;注意:图像需要格式化为.jpg,.jpeg,.gif或.png文件。图片上传限制为每个文件30MB。虽然可以上传大小为5000 x 5000像素的图像,但图像的显示不会超过1920 x 1080像素。&#34;