iOS image resize with Rhomobile generates rotated pictures - ios

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,

Have you tried Launchpad developer community? it is a forum for RhoElements developers
Launchpad developer community
you can register for free.

I fixed the issue by using the UIImage+Resize library. Full pull request is here:
https://github.com/rhomobile/rhodes/pull/81

Related

How to use Vectors in Xcode 8

I'm looking for solution of problem that I get image from my server and that image will be only be one(not for compatible all devices) and that image will also use in android device too so as you know android support SVG but iOS isn't (that 1 image should be use on all iOS devices even on iPad too). I look into this Tutorial and this use from PDF and also use local pdf.
So what will be approach from iOS end or server end to download 1 image (with one size) and will be show on all devices.
Looking for suggestions and help to resolve this issue.
You can try to implement PocketSVG (https://github.com/pocketsvg/PocketSVG) to do that.
There is one downfall though: it only supports SVG features that can be drawn using CGPaths or UIPaths.

Drupal 8 - photos uploaded using iOS devices are rotated

When using iOS devices such as the iPhone (and possibly other devices; not Android devices however), photos taken and uploaded in drupal 8 are rotated to a 90 degree angle.
For example, images taken and uploaded vertical are posted horizontal.
Images taken and uploaded horizontal are posted upside down.
Any help would be appreciated
Many thanks
------------------EDIT---------------
I'm currently using Drupal 8's code, so the code is in its original state.
Is there a way to not change the code and download a module or something which can correct the problem?
Below is an example of how images are automatically rotated from the uploaded/original image and posted image...
Example 1

How to PSD to iphone app

I recently designed an iphone app in photoshop and asked developer to code that. That developer sent me a horrible image to define what he is expecting me as deliverable.
Here is the link to the image
Since I've lot of screens so it will take a lot of time to make examples of each screens like that. That developer doesn't know anything about PSD and says that he had developed previous 10 application in the same way. I google out about what is the professional way to achieve the task but didn't find any good solution.
I'm front end developer and what I do? I simply take PSDs and measure all stuff as described in above image my self.
Please write how should we proceed? What are the best practices to follow.
What I always do is resizing the png to the height of an real IPhone screen. That way you'll be able to open it in photoshop and use the measure tool.
So, what you'll have to do is: Crop the image to the screen (so the picture is the 'screen' of the iPhone), set height in pixels and measure!
Good luck

Regarding iOS resolution support for cocos2d-JS v3 portrait mode

I have an assets made with 1920 * 1080 resolution , with the same resolution I want to support iOS how with the scaling factor without getting new assets. It is working properly in android but not in iOS
I was trying the multiresolution support provided by cocos2d-x but then Its not working properly,
Here what I was trying
cc.view.setDesignResolutionSize(1080,1920, cc.ResolutionPolicy.FIXED_HEIGHT);
Its showing very small view port at the top right corner and I am unable to understand why this is happening and how do I solve this.

Phonegap: Image Capture orientation going wrong after upload

I am developing a Phonegap application for IOS and I want to use Capture plugin for it. I have installed the plugin using CLI and added permissions in the config.xml file but the plugin os not working it do not show any output or error.
Basically the problem I have is with the image orientation when image captured from the camera. The image rotates in landscape direction.
I have tried to read the exif data in PHP but IOS trims the exif data from image before sending it to the server
I have installed the capture plugin but it is not working on IOS 7.1
I just need to make the orientation of the image right when taken from the camera.
Within the .getPicture() call you can set the option
correctOrientation: true
This solved my problem of portrait images turning horizontal however on my LG G2 significant lag was added during the capture process when this flag was set. I'm still trying to figure out a server-side fix but with some EXIF data being stripped it's a bit challenging.
Docs explain a little more:
http://plugins.cordova.io/#/package/org.apache.cordova.camera
correctOrientation: Rotate the image to correct for the orientation of the device during capture. (Boolean)

Resources