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)
Related
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.
In my app I do image post processing in real time and want to have source image, without this feature.
Who knows how or have some ideas about it?
I have written an QR Code Scanner application for iOS using ZXingObjC library. I scaned QR code using camera (AVCaptureSession), it worked very well. But when I scan UIImage get from camera roll (UIImagePickerViewController), I am not able to scan some QRCode. I debug, I know that library is not detecting correct position of left bottom corner.
So, my question is " Is there any difference between image take by camera and image copy from PC to iPhone".
Thanks.
I cannot find the answer for my question, but I find a solution for my problem. I don't know "Is there any difference between image take by camera and image copy from PC to iPhone". But now I can scan the UIImage (which before this time, I can't scan). My solution is ROTATE this UIImage a small angle. I don't know that is my error or ZXingObjC error.
I hope it can help who has same problem.
I have one HTML file control using this i am trying to upload file on server.
Click on file control
It will automatically open dialog for file/camera selection.
I select Camera
I captured photo and save
Now submit form
the Capture photo save successfully on server but it is rotated 90
degree.
This problem is only with iPhone or IOS.
<input id="image" name="image" type="file" accept="image/*" capture style="width: 58px" />
Please let me know, how to stop automatic rotation of image if captured from camera.
Thanks,
Imdadhusen
This could have something to do with EXIF/TIFF metatags in the images.
One of these tags indicates the orientation of the image. Some photos you upload to a server (eg from the iPhone) may have these tags, others (from a different source / workflow) may not. The server may or may not retain these tags, and may or may not read the tags in order to attempt correct orientation of the image. Similarly a web browser may or may not pay attention to these tags. If you upload images containing tags, the results will certainly be unpredictable.
A good way to find out if this is the issue would be to download a 'problem' image and a 'good' image from the server, and compare them. Open them in preview and check the second tab of the Inspector. Any meta-info will be displayed there. See if one image has orientation info and the other not. If neither display meta-info then it is fairly likely the server is stripping it all out and not using it, and you can forget about this answer.
Also you should compare in different browsers. Some browsers read this orientation info and rotate the image accordingly, others do not.
For example, an iPhone photo of mine which was take in portrait mode has the following metatags:
Pixel Height: 2,448
Pixel Width: 3,264
Orientation: 6 (Rotated 90° CCW)
The native bitmap orientation is landscape.
The 'orientation' metatag indicates to image reading software to rotate to portrait for display.
The metatag is used by (some) image software to 'correctly' rotate the image to portrait but ignored by other software which will display the image as landscape.
The situation is confusing and there is no established standard for this (the tags are just a hint), so when preparing images for an online publication the safest thing is to strip out these tags and physically rotate the image to the correct BITMAP orientation before uploading. If you are writing the server side of an app you could do this on the server. But it is vital to deliver images to a web browser in the correct BITMAP orientation with no orientation metatags.
Why is this? Because even today different browsers take different approaches to metatags.
The iPhone image I just mentioned displays as follows:
Google Chrome 24 portrait
Safari 6 portrait
Firefox 17 landscape
Opera 12 landscape
Not a great state of affairs!
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