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.
Unfortunately, activation email could not send to your email. Please try again.

Capturing with the camera

Thread ID:

Created:

Updated:

Platform:

Replies:

115154 Dec 30,2013 10:56 AM Jan 6,2014 01:11 AM Orubase 7
loading
Tags: Orubase
Carlos Lopes
Asked On December 30, 2013 10:56 AM

Hi.

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.

Carlos Lopes
Replied On December 30, 2013 12:19 PM

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.

Gobi M [Syncfusion]
Replied On December 31, 2013 08:21 AM

Hi,

 

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.

 

PicUpload.zip

 

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.

 

Regards,

 

Gobi M

 


Carlos Lopes
Replied On January 2, 2014 05:12 AM

Hi.

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.



Carlos Lopes
Replied On January 2, 2014 09:51 AM

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.

Gobi M [Syncfusion]
Replied On January 3, 2014 02:41 AM

Hi,

 

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.

 

Regards,

Gobi M


Carlos Lopes
Replied On January 3, 2014 04:51 AM

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!

Sahaya Sweetlin Ponmalar P [Syncfusion]
Replied On January 6, 2014 01:11 AM

Hi,

 

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

 

Regards,

Ponmalar P


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;