apache / cordova-plugin-camera

Apache Cordova Plugin camera
https://cordova.apache.org/
Apache License 2.0
960 stars 1.52k forks source link

Panoramic images #885

Closed AsandahDevs closed 3 weeks ago

AsandahDevs commented 3 weeks ago

Feature Request

Motivation Behind Feature

I want app users to have the ability to take wider pictures without having to capture the same image in different positions. This could result in an improvement in the device storage.

Feature Description

The current camera plugin only allows users to take pictures or upload images from the gallery . I need an option to allow users to take panoramic images especially since most modern device cameras support this feature natively. I may not have a clue how the code may look but the screenshot should provide a clue of how this feature should work. image

Alternatives or Workarounds

Currently there are no alternatives i know of.

breautek commented 3 weeks ago

I don't believe this is something that we can support because I don't think there is a underlying standard API.

Camera features comes from the underlying camera app. How android (and iOS) works is by delegating a camera task by opening up the underlying camera app for the user to snap a picture. This is for a number of reasons which I won't discuss here, just know that features provided are based on the camera app which can be chosen by the user. Speaking more on android than iOS (due to my own personal knowledge), there are Intent options to request images or video specifically, as well as desired quality or format. There is no intent option to request specifically a panoramic image.

Note that even if the camera app does support paranomic images, it may choose not expose that feature in it's intent activity used to serve other applications. But if it did, I suspect that the user could create a panoramic image without any code changes in the cordova plugin.

At the end of the day though, panoramic image support depends on the installed camera application that the user has on their device. Not all devices may have a default camera app that supports panaromic, or even if a device's default camera app does support it, the user may choose to use an alternate camera app that doesn't actually support panoramic images. For this reason, I'll be closing this feature request. We may re-evaluate if there becomes a standardized way to request/enable panoramic images in the intent system.

If panoramic images support is critical for your app, then natively using the camera APIs directly and implementing panoramic support directly would be a far more reliable solution because you remove the dependency of your user having a supporting camera application. This means you'll need to find a plugin or create one yourself that implements the panoramic feature using the camera APIs rather than using the intent system (like this plugin does).

Kind regards