libcamera: color_space: Add fromString() function
Add a ColorSpace:fromString() function to parse a string into a color space. The string can either contain the name of a well-known color space, or four color space components separate by a '/' character. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
@@ -59,6 +59,8 @@ public:
|
||||
|
||||
std::string toString() const;
|
||||
static std::string toString(const std::optional<ColorSpace> &colorSpace);
|
||||
|
||||
static std::optional<ColorSpace> fromString(const std::string &str);
|
||||
};
|
||||
|
||||
bool operator==(const ColorSpace &lhs, const ColorSpace &rhs);
|
||||
|
||||
Reference in New Issue
Block a user