nstudio / nativescript-camera-plus

MIT License
79 stars 50 forks source link

Camera preview distorted #41

Closed NewVote closed 5 years ago

NewVote commented 6 years ago

I am using the demo code to implement a camera preview in my view, and the image is distorted (skewed)

Skewed Camera

Those are meant to be squares, and you can see in the captured image it is coming out OK. This warping is visible in a real device as well.

I am capturing with default options:

this.cam.takePicture({ saveToGallery: true });

I have tried setting the height and width myself in the CameraPlus component, but even forcing it to be a square (see example below) there is still some skewing.

<CameraPlus height="250"
    width="250"
    debug="true"
    galleryPickerMode="single"
    showFlashIcon="true"
    showToggleIcon="true"
    showCaptureIcon="true"
    showGalleryIcon="true"
    confirmSaveText="CONFIRM!"
    confirmRetakeText="RETAKE!"
    (loaded)="camLoaded($event)"
    (toggleCameraEvent)="toggleCameraEvent($event)"
    (photoCapturedEvent)="photoCapturedEvent($event)"
    (imagesSelectedEvent)="imagesSelectedEvent($event)">
</CameraPlus>

My goal is to have the preview display well at full screen width, with a set height (about 1/4 the screen)

carrbrpoa commented 6 years ago

Happens to me too

felipebueno commented 6 years ago

Same issue here!

felipebueno commented 6 years ago

In my case, it only happens when the camera is in fullscreen and the actionbar is hidden.

With Actionbar: with_action_bar

Without Actionbar without_action_bar

felipebueno commented 6 years ago

@bradmartin Can you help us on that? :smile:

bradmartin commented 6 years ago

update: I am low on time right now, I'm hoping to get to some of these issues in the next week.

marcelofb commented 5 years ago

Any news about this? Any way to fix it?

bradmartin commented 5 years ago

I am not 100% but I think something around this code here is what needs to be improved and worked on.

bradmartin commented 5 years ago

closing for now with 2.0.1 released with improvements in PR #60

yesyo commented 5 years ago

I'm pulling from master but still see the skewing happening. I'm testing on my Samsung S8.

Here's the screenshot:

screenshot_20181227-090759_demo

And here's the photo taken:

img_1545876485367

Any idea?

felipebueno commented 5 years ago

Same here o/

AntoineBouquet commented 5 years ago

Same problem for me

But I could fix it by force the enableVideo to true

mashinokatsumi commented 5 years ago

But I could fix it by force the enableVideo to true

I enabled the enableVideo but didnt work.

luiguild commented 4 years ago

This problem continues when camera is in fullscreen, anyone already solved this?