( imageFiles: Map<string, File> | undefined, imageName: string )
| 170 | * - "cam1/photo.jpg" -> "masks/cam1/photo.jpg.png" |
| 171 | */ |
| 172 | export function getMaskFile( |
| 173 | imageFiles: Map<string, File> | undefined, |
| 174 | imageName: string |
| 175 | ): File | undefined { |
| 176 | if (!imageFiles || !imageName) return undefined; |
| 177 | |
| 178 | for (const path of getMaskLookupPaths(imageName)) { |
| 179 | const match = imageFiles.get(path) || imageFiles.get(path.toLowerCase()); |
| 180 | if (match) return match; |
| 181 | } |
| 182 | |
| 183 | return undefined; |
| 184 | } |
| 185 | |
| 186 | /** |
| 187 | * Get statistics for local image files. |
no test coverage detected