【问题标题】:iOS image resize with Rhomobile generates rotated picturesiOS 使用 Rhomobile 调整图像大小生成旋转图片
【发布时间】:2012-08-06 22:22:38
【问题描述】:

我正在使用 Rhodes 3.3.3 为 iOS 和 Android 进行开发。我的应用程序使用相机,我需要调整图片大小。我使用以下 Rhodes 命令来调整图片大小:

settings = {:enable_editing => false, :desired_width => 800, :desired_height => 800}
Camera::take_picture(url_for(:action => :camera_callback_new), settings)

文档:http://docs.rhomobile.com/rhodes/device-caps#camera

返回的图片已调整大小。但是,如果是纵向模式,它会旋转 90 度,如果我是横向模式,它会旋转 180 度。

我的问题的视觉解释:https://groups.google.com/forum/?fromgroups#!topic/rhomobile/W0b46OllwRw

相机的 Rhodes 源代码链接如下。到目前为止,我还没有弄清楚问题出在哪里。如果我不指定调整大小,则图片不会旋转。到目前为止,罗德支持一直忽略我的请求。

https://github.com/rhomobile/rhodes/blob/master/platform/iphone/Classes/Camera/PickImageDelegate.m

谢谢,

尼克,

【问题讨论】:

    标签: ios camera rhomobile rhodes


    【解决方案1】:

    您是否尝试过 Launchpad 开发者社区?这是 RhoElements 开发人员的论坛

    Launchpad developer community

    您可以免费注册。

    【讨论】:

    【解决方案2】:

    我通过使用 UIImage+Resize 库解决了这个问题。完整的拉取请求在这里:

    https://github.com/rhomobile/rhodes/pull/81

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-11
      • 2017-08-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-20
      • 1970-01-01
      相关资源
      最近更新 更多