esp32cam
OV2640 camera on ESP32-CAM
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Friends | List of all members
esp32cam::Resolution Class Reference

Picture width and height. More...

#include <resolution.hpp>

Inherits Printable.

Public Member Functions

 Resolution (int frameSize=-1)
 Constructor.
 
bool isValid () const
 Determine if this resolution is valid.
 
int getWidth () const
 Return picture width in pixels.
 
int getHeight () const
 Return picture height in pixels.
 
size_t printTo (Print &p) const override
 Print WxH to output stream.
 
template<typename T >
as () const
 Convert to framesize_t (internal use).
 

Static Public Member Functions

static ResolutionList list ()
 Return an iterable collection of possible resolutions.
 
static Resolution find (int minWidth, int minHeight)
 Find a resolution that satisfies given constraints.
 

Friends

bool operator== (const Resolution &lhs, const Resolution &rhs)
 
bool operator!= (const Resolution &lhs, const Resolution &rhs)
 
bool operator< (const Resolution &lhs, const Resolution &rhs)
 
bool operator> (const Resolution &lhs, const Resolution &rhs)
 

Detailed Description

Picture width and height.

Constructor & Destructor Documentation

◆ Resolution()

esp32cam::Resolution::Resolution ( int  frameSize = -1)
explicit

Constructor.

Parameters
frameSizeframesize_t value.

Member Function Documentation

◆ as()

template<typename T >
T esp32cam::Resolution::as ( ) const
inline

Convert to framesize_t (internal use).

Template Parameters
Tframesize_t

◆ find()

Resolution esp32cam::Resolution::find ( int  minWidth,
int  minHeight 
)
static

Find a resolution that satisfies given constraints.

This searches among all resolutions defined in the esp32-camera libary, which is not necessarily supported by the camera hardware.

◆ getHeight()

int esp32cam::Resolution::getHeight ( ) const

Return picture height in pixels.

◆ getWidth()

int esp32cam::Resolution::getWidth ( ) const

Return picture width in pixels.

◆ isValid()

bool esp32cam::Resolution::isValid ( ) const

Determine if this resolution is valid.

◆ list()

ResolutionList esp32cam::Resolution::list ( )
static

Return an iterable collection of possible resolutions.

This list contains all resolutions defined in the esp32-camera library, but not necessarily supported by the camera hardware. Use Camera.listResolutions() to retrieve supported resolutions.

◆ printTo()

size_t esp32cam::Resolution::printTo ( Print &  p) const
override

Print WxH to output stream.

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const Resolution lhs,
const Resolution rhs 
)
friend

◆ operator<

bool operator< ( const Resolution lhs,
const Resolution rhs 
)
friend

◆ operator==

bool operator== ( const Resolution lhs,
const Resolution rhs 
)
friend

◆ operator>

bool operator> ( const Resolution lhs,
const Resolution rhs 
)
friend

The documentation for this class was generated from the following files: