| Total Complexity | 5 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 4 | class Requirements |
||
| 5 | { |
||
| 6 | /** |
||
| 7 | * Determines if FaceRecognition can work with a givem image type. This is determined as |
||
| 8 | * intersection of types that are supported in Nextcloud and types that are supported in DLIB. |
||
| 9 | * |
||
| 10 | * Dlib support can be found here: |
||
| 11 | * https://github.com/davisking/dlib/blob/9b82f4b0f65a2152b4a4243c15709e5cb83f7044/dlib/image_loader/load_image.h#L21 |
||
| 12 | * |
||
| 13 | * Note that Dlib supports these if it is compiled with them only! (with libjpeg, libpng...) |
||
| 14 | * |
||
| 15 | * Based on that and the fact that Nextcloud is superset of these, these are supported image types. |
||
| 16 | * |
||
| 17 | * @param string $mimeType MIME type to check if it supported |
||
| 18 | * @return true if MIME type is supported, false otherwise |
||
| 19 | */ |
||
| 20 | 4 | public static function isImageTypeSupported(string $mimeType): bool { |
|
| 32 |