11#include "enrollment/Export.h"
86 static constexpr uint8_t
UNKNOWN = 255;
113 explicit operator bool() =
delete;
114 explicit constexpr operator Type()
const
119 constexpr bool operator==(ImageType t)
const
121 return type == t.type;
123 constexpr bool operator!=(ImageType t)
const
125 return !(*
this == t);
127 constexpr bool operator==(Type t)
const
131 constexpr bool operator!=(Type t)
const
133 return !(*
this == t);
136 [[nodiscard]]
constexpr const char* ToFileExtension()
const
169 if (extension ==
".bmp")
174 if (extension ==
".png")
179 if (extension ==
".wsq")
184 if (extension ==
".iraw")
189 if (extension ==
".jpeg" || extension ==
".jpg" || extension ==
".jpe")
194 if (extension ==
".tiff" || extension ==
".tif")
199 if (extension ==
".jp2")
204 if (extension ==
".webp")
215 static constexpr Type Convert(uint8_t t)
Exception for image processing.
Definition ImageException.h:24
@ UNKNOWN_IMAGE
Image type is not supported.
Definition ImageException.h:35
It contains all supported image types.
Definition ImageType.h:21
constexpr ImageType(uint8_t t)
Construct ImageType from basic type When value does not match enum value then UNKNOWN is set.
Definition ImageType.h:103
static ImageType FromFileExtension(const std::string &extension)
Construct ImageType from file extension.
Definition ImageType.h:166
Type
Type of supported images.
Definition ImageType.h:27
@ JPG2000
JPEG 2000 is an image compression standard and coding system - jp2.
Definition ImageType.h:76
@ JPG
Joint Photographic Experts Group - jpeg, jpg, jpe.
Definition ImageType.h:59
@ BMP
Windows bitmaps - bmp, dib.
Definition ImageType.h:32
@ TIFF
Tagged Image File Format - tiff, tif.
Definition ImageType.h:65
@ PNG
Portable Network Graphics - png.
Definition ImageType.h:39
@ WEBP
WebP is an image file format developed by Google - webp.
Definition ImageType.h:82
@ IRAW
Innovatrics proprietary RAW image - iraw.
Definition ImageType.h:52
@ WSQ
Wavelet Scalar Quantization - wsq.
Definition ImageType.h:46
constexpr ImageType(Type t)
Construct ImageType from enum Type.
Definition ImageType.h:91
static constexpr uint8_t UNKNOWN
Unknown image type.
Definition ImageType.h:85