【问题标题】:ImageIO error HTML not displaying images taken from iPhone in web viewImageIO 错误 HTML 未在 Web 视图中显示从 iPhone 拍摄的图像
【发布时间】:2013-04-03 13:36:01
【问题描述】:

在我的应用程序中,我正在拍摄图像并保存在文档目录中。 在 tableView 中显示时,图像显示正常,但在 Web 视图中加载相同的图像时,从 xml 和 xslt 本地创建的 HTML 显示以下错误

<Error>: ImageIO: PNG invalid PNG file: iDOT doesn't point to valid IDAT chunk

从照片库中捕获图像时,在模拟器上工作正常。 有人可以帮我吗。 图像的 xslt 代码是

<xsl:for-each select="PrecisionVestor/PhotoSection/Photo">
<div style="width:46%; height:180px; float:left; margin-top:10px; margin-left:2%; margin-right:2%;">
<div class="caption_pic" >
<img style="background-size:cover;">
<xsl:attribute name="src">
<xsl:value-of select="PhotoPath" />
</xsl:attribute>
</img>
</div>
<div class="caption_txt" ><xsl:value-of select="Note" /></div>
</div>
</xsl:for-each>

【问题讨论】:

  • 发布您的代码以供审核

标签: iphone html webview javax.imageio


【解决方案1】:

我终于解决了这个问题。 而不是在以 png 格式捕获图像时保存图像,而是以 jpeg 格式保存它们。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-09-15
    • 2011-08-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多