#[repr(u8)]
pub enum Resolution {
Show 13 variants Qqvga, Qvga, Vga, Svga, Hd, Sxgam, Uxga, Fhd, Qxga, Wqxga2, Res96x96, Res128x128, Res320x320,
}
Expand description

The resolution of the image captured by the camera

Qvga and Vga are good test values. Qqvga is listed in the SDK, however is also not explicitly added to the camera’s supported resolutions. Based on testing with a 5MP camera, some resolutions have been feature-gated as only working on 3MP as they did not work on 5MP. However, this hasn’t been tested yet.

If both the 3mp and 5mp features are enabled, this enum will have a Fhd (1080p) default, as that is the highest resolution compatible with both cameras. When only the 3mp feature is enabled, the enum will default to the camera’s maximum supported resolution: Qxga. When only the 5mp feature is enabled, the enum will default to Wqxga2.

Variants§

§

Qqvga

Available on crate feature 3mp only.

QQVGA resolution (160x120). Tested to not work on 5MP. Untested on 3MP.

§

Qvga

QVGA resolution (320x240). Untested on 3MP.

§

Vga

VGA resolution (640x480). Untested on 3MP.

§

Svga

Available on crate feature 3mp only.

SVGA resolution (800x600). Tested to not work on 5MP. Untested on 3MP.

§

Hd

HD resolution (1280x720). Untested on 3MP.

§

Sxgam

Available on crate feature 3mp only.

SXGAM resolution (1280x960). Tested to not work on 5MP. Untested on 3MP.

§

Uxga

UXGA resolution (1600x1200). Untested on 3MP.

§

Fhd

FHD resolution (1920x1080). This is the default choice for this enum when both the 3mp and 5mp features are enabled. Untested on 3MP.

§

Qxga

Available on crate feature 3mp only.

QXGA resolution (2048x1536). This is the default choice for this enum when the 3mp feature (only) is enabled. Untested.

§

Wqxga2

Available on crate feature 5mp only.

WQXGA2 resolution (2592x1944). This is the default choice for this enum when the 5mp feature (only) is enabled.

§

Res96x96

96x96 resolution. Untested on 3MP.

§

Res128x128

128x128 resolution. Untested on 3MP.

§

Res320x320

320x320 resolution. Untested on 3MP.

Trait Implementations§

source§

impl Clone for Resolution

source§

fn clone(&self) -> Resolution

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Resolution

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Resolution

source§

fn default() -> Resolution

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.