We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Capturing with the camera


I'm using your native API to take a picture and send it to the server, but the picture sent is always 53k in file size and 153x204 resolution. Orubase API seems to create the two images, but is sending only the smaller one. Do you have an example on how to upload the full resolution image to the server? 

Thank you.

7 Replies

RR Rui Rodrigues December 30, 2013 05:19 PM UTC

I actually found an example in the forum in the meantime, but it's basically the same code I have and the images uploaded are still too small. Is there any way to change this?

Thank you.

GM Gobi M Syncfusion Team December 31, 2013 01:21 PM UTC



Thanks for your interest in Orubase.


We have tested the Take Photo size issue and we are not able to reproduce the issue. However we have prepared the Image upload sample with full resolution images for your reference.




Could you please let us know the platform (iOS, Android, WP7) in which you are facing this issue if the issue is still not resolved, so that we can analyze further and provide a solution.




Gobi M


RR Rui Rodrigues January 2, 2014 10:12 AM UTC


Thank you for your answer, I'll test your proposed solution as soon as possible. This problem happens with Android 4.3 and up, I have the device connected to Dropbox and every time a picture is taken with "Take Photo", 2 images get uploaded there, one JPG, the full picture, and one PNG, the one returned to Take Photo, so I was wondering if it was a settings problem.

I will test your code and come right back to you. Thank you.

RR Rui Rodrigues January 2, 2014 02:51 PM UTC

Ok, I found out what was missing: 

Orubase.Media.captureImage({ quality: "100", uritype: "file", encodingtype: "jpeg", savetophotolibrary: "true", cameradirection: "back" }
    onSuccess: function (data) { },
    onFailure: function (data) { }

the "options" part it's not very well documented, I still don't know what uri types I can use, for example.

I have another question: taking pictures saves a copy to the app path, right? Is there a way to clean those pictures after submit? I need to be able to submit image content and then delete the image from the device and using your example and what I understand of it, I have picture content or picture path, right? Is this possible with Orubase.Storage methods?

Thank you.

GM Gobi M Syncfusion Team January 3, 2014 07:41 AM UTC



Sorry for the inconvenience caused.


The following options are available in Orubase CaptureImage API.


Name                              : Users allowed to get the image with given name. This options allowed to enter name for the image. Captured image will be returned with given name. If there is no name given image will be returned with set of random characters.


Quality                            : 1 to 100 to represents the image quality

                             Default value to this option is “50”.


Uritype                           : Available input types are file and data. Taking picture via Capture API saves image in application memory. And also

                            If the URI type is set to file, the file path for the image in application storage will be returned.

                            If the URI type is set to data, then the image base64 data will be returned in success method.

                            Default value to this option is “data”.


saveToPhotoLibrary : Boolean option for storing image into device photo library.

                            If saveToPhotoLibrary is true, then the captured image will be stored in device photo library.

                                            If saveToPhotoLibrary is false, then the captured image will not be stored in device photo library.

                                            Default value to this option is “true”.


cameraDirection       : Available options are front and back.

                           It determines the captureImage will call the native camera with front or rear camera opened.

                           Default value for this option is “back"


Size                                : Users allowed to set the size for the captured image. Size format height * width.


Encodingtype            : Available encoding types are JPEG and PNG. For the given input it will return the respective type of image.



The option saveToPhotoLibrary available to prevent storing image from device photo library.


Also it is possible to upload image to the server and delete the image from device by following the below steps.


                 1 .  Call capture image to take photo

                 2 .  Upload photo using Orubase FileTransfer API.

                 3 . Then delete the file using Orubase Storage Delete file API. For more information on file API please follow the link http://help.syncfusion.com/UG/orubase/documents/filestorage.htm

                      For android input directory name as “CaptureImage” and file name.

                      For Windows phone input directory name as “OrubaseCameraImages” and file name

      Currently we do not have options for deleting image from application memory in iOS.         


We will update the same in online Orubase documentation as soon as possible.



Please let us know if you have any queries.



Gobi M

RR Rui Rodrigues January 3, 2014 09:51 AM UTC

Thank you so much.

I will try out this new info, but I can tell that's right what I wanted.

Thank you, again, for all your help!

SS Sahaya Sweetlin Ponmalar P Syncfusion Team January 6, 2014 06:11 AM UTC



Thanks for the update and please let us know if you need any further assistance



Ponmalar P

Live Chat Icon For mobile
Up arrow icon