首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在web浏览器控件中显示大图像- MS Access

问在web浏览器控件中显示大图像- MS Access
EN

Stack Overflow用户
提问于 2015-09-16 16:30:48
回答 1查看 1.4K关注 0票数 1

截图:

​

​

尝试在MS Access 2010中的IE web浏览器控件中显示大图像(大于5000x5000)时,图像不会显示。

我使用VBA来导航和向对象的文档写入内容。我已经测试了这两种方法,并且得到了相同的结果。较小的图像渲染没有问题。

LE代码如下:

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

发布于 2015-09-16 21:25:45

你确定你能做到吗?否则,您可以在此处重新设置图像像素:http://www.garyshood.com/imageconvert/

我在GoDaddy帮助中找到了这样的内容:“注意:图片需要格式化为.jpg、.jpeg、.gif或.png文件。图片上传限制为每个文件30MB。虽然可以上传5000 x 5000像素的图片,但显示的图片不会大于1920 x 1080像素。”

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32603424

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档