0

I'm using Rhodes 3.3.3 to develop for iOS and Android. My app uses the camera and I need to resize pictures. I use the following Rhodes commands to resize the picture:

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

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

The picture returned is resized. However, if it is taken in portrait mode, it is rotated 90 degrees and if I take it in landscape mode, it is rotated 180 degrees.

Visual explanation of my problem: https://groups.google.com/forum/?fromgroups#!topic/rhomobile/W0b46OllwRw

The Rhodes source code for the camera is linked below. As of yet, I have not been able to figure out where the problem is. The picture is not rotated if I do not specify a resize size. The Rhodes support has ignored my requests so far.

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

Thanks,

Nick,

fnllc
  • 3,047
  • 4
  • 25
  • 42

2 Answers2

0

Have you tried Launchpad developer community? it is a forum for RhoElements developers

Launchpad developer community

you can register for free.

Snake Sanders
  • 2,641
  • 2
  • 31
  • 42
  • I have, but my messages have been ignored. However, I did fix the problem with some trial and error: https://github.com/rhomobile/rhodes/pull/81 – fnllc Aug 15 '12 at 09:30
0

I fixed the issue by using the UIImage+Resize library. Full pull request is here:

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

fnllc
  • 3,047
  • 4
  • 25
  • 42