Image.rotate90Degrees()不适用于iOS,它适用于模拟器和安卓系统。
在Nexus5 -Android上图片正常
[

]
但在iPhone6Plus上,它会变成底部为白色的正方形:
[

]
以下是示例代码:
public void start()
{
if(current != null){
current.show();
return;
}
Form hi = new Form(new BorderLayout(BorderLayout.CENTER_BEHAVIOR_CENTER));
Label label = new Label();
hi.addComponent(BorderLayout.CENTER, label);
Image image = pictures.getImage("000008.jpg");
Image imageNew = Image.createImage(Display.getInstance().getDisplayHeight(), Display.getInstance().getDisplayWidth());
Graphics graphics = imageNew.getGraphics();
graphics.drawImage(image, 0, 0, imageNew.getWidth(), imageNew.getHeight());
imageNew = imageNew.rotate90Degrees(false);
label.setIcon(imageNew);
hi.show();
}发布于 2016-02-14 11:59:49
由于该图像无论如何都是克隆的,因此不需要将其绘制到新图像上。一般使用多幅图像的slows down the application in iOS。
如果你只是在image本身上做一个roateImage,它应该可以工作。这可能是因为6+是一个非常高的DPI设备,所以图像可能太大了,以至于在某个时候超过了某个纹理大小的阈值。
https://stackoverflow.com/questions/35381143
复制相似问题