【发布时间】:2015-01-27 09:56:57
【问题描述】:
我有一个应用程序,用户可以在其中拍摄并保存他们的个人资料照片。我正在使用来自 github 的https://github.com/RileyGB/BlackBerry10-Samples/tree/master/WebImageViewSample 示例将图像从 url 加载到我的视图中,它工作正常。问题是当我从 ios 保存个人资料图片并在黑莓中查看个人资料图片时,它看起来向左旋转了 90 度。但是相同的 url 在 ios 和 android 中加载很好。下面是从 iOS 获取的示例图像的链接,该示例图像可以正确加载 ios 和 android,但在黑莓中向左移动到 90 度。它适用于从黑莓或安卓获取的其他图像。有没有什么办法解决这一问题?任何帮助表示赞赏
http://oi57.tinypic.com/2hzj2c4.jpg
下面是在 qml 中加载此图像的示例代码
Page {
Container {
layout: DockLayout {
}
WebImageView {
id: webViewImage
url: "http://oi57.tinypic.com/2hzj2c4.jpg"
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: VerticalAlignment.Center
visible: (webViewImage.loading == 1.0)
}
ProgressIndicator {
value: webViewImage.loading
verticalAlignment: VerticalAlignment.Center
horizontalAlignment: HorizontalAlignment.Center
visible: (webViewImage.loading < 1.0)
}
}
actions: [
ActionItem {
title: "Clear Cache"
ActionBar.placement: ActionBarPlacement.OnBar
onTriggered: {
webViewImage.clearCache();
webViewImage.url = "http://oi57.tinypic.com/2hzj2c4.jpg";
}
}
]
}
【问题讨论】:
-
如果我在浏览器网站中打开图像,它也会旋转(但如果我查看图像本身就可以了)。您自己制作 iOS 和 Android 应用程序吗?
-
检查EXIF 问题。我
-
不,其他人在 iOS 和 android 上做了这个应用,我在黑莓上做。但是,如果我尝试在 iOS 或 android 中加载此图片,它会显示正确而无需旋转。如何在黑莓中修复它?它似乎在 android 中工作,所以我想黑莓也应该有一些修复
-
此外,如果我在我的电脑(Windows 7)中下载此图像,预览会显示旋转的图像,但如果我将此图像复制到黑莓设备中并在其图库中查看,它会显示正确的图像。我也尝试在设备上复制后使用文件选择器加载此图像,但使用文件选择器加载的图像显示旋转图像。
-
看,图片旋转了。 EXIF 包含此信息“Orientation Rotate 90 CW”来纠正它,但是 WebImageView 忽略 EXIF 并且不旋转它。阅读this on support forums
标签: blackberry imageview qml blackberry-10 blackberry-cascades