Camera 3 sample


Peter Bradstreet
Hi David, I am at a point where I need to incorporate using a picked photo or taken photo from a phone in the app and am looking at the Camera 3 sample. I figured that I would throw the sample on my phone using Phonegap build to see what it looked like but Phonegap build is giving the error: . Do you think that this is a Phonegap build issue or an AB issue? Cheers, Pete

Peter Bradstreet
False alarm, I copied the sample code into my app and it compiled phonegap build with no issue and is working in my app. Cheers, Pete

DecSoft

Well... let us time to try to say something! But glad to know that you got it, Peter. :-)



DecSoft

May finally I can say something... but just for your information. Certainly the Camera plugin of Cordova works like a charm, but, if we can use an Input File... maybe it's enough... and doing this, our app can work (at least in this aspect) in all the platforms and browsers. But it's completely up to you and your needs, Peter.



Tinn Aphopchung
But Input File.. have a problem with photo orientation on many device (samsung,huawei,xiaomi,etc.).You need to fix by read exif data in photo to determine what the real orientation is.Camera have a problem too,but can be fix by config.

DecSoft

Hello Tin,

Certainly, sometimes the taken picture must be "fixed" in the server side, for example: I remember that we use some PHP code in order to do it, if anyone is interested, may I can copy it here. The Input file have the advantage of the multiplatform. If we "only" target platforms like Android and iOS, then certainly we can choose whatever we wanted: the Camera plugin or the Input file. Not to mention that we can may use both approaches, determining the platform in which our app is running.



Tinn Aphopchung

Yes, David. Please copy your server side solution too for other people who have the same problem.

For a solution on client side to show image as it expect is to use javascript 'load-image.js' by insert function before image show

here is a js file that have loadImage function.

http://ultri.top/nfnIX

ref :

https://github.com/blueimp/JavaScript-Load-Image

https://output.jsbin.com/lozonuy/


DecSoft

Hello to all,

Thanks for sharing that stuff here, Tin. Here is a PHP function that can be used for uploaded images. Unfortunatelly I can't credit the author of the code. I did not remember where I get... or where I get the idea, at least... I remember I modify it a bit... :-(


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.