VirtuoWorks / CanvasCameraPlugin

Cordova/PhoneGap CanvasCamera Plugin
MIT License
38 stars 30 forks source link

Image data in capture resolution #21

Open sommcz opened 5 years ago

sommcz commented 5 years ago

Hello,

i there any proved/suggested way how to get image data in resolution specified by capture options?

As of following line of code

fullsizeData = getResizedAndRotatedImage(fullsizeData, mCanvasWidth, mCanvasHeight, displayOrientation);

Fullsized data are shrinked to canvas size into resulting data/file.

Canvas data are only for preview, but i need bigger resolution for live data processing.

I found two ways how to do it:

Is there any better way how to do it?

Thank you

Sami-Radi commented 5 years ago

Hello,

The first option (> setting the canvas size to a bigger size) is the current best solution.

The second option (> modify java/ios code ) needs to process the image 2 times, when in portrait (rotate & resize the image for the canvas, rotate the captured image for use in the webview). I believe that live image processing is a heavy task for the phone and i'm not sure that the hardware can keep up with good performances. I'll have to do some benchmarks before introducing this kind of modifications.

Best Regards,