(imageName: string)
| 166 | } |
| 167 | |
| 168 | export function getMaskPathVariants(imageName: string): string[] { |
| 169 | const normalized = normalizeImagePath(imageName); |
| 170 | const basePath = normalized.toLowerCase().startsWith('images/') |
| 171 | ? normalized.slice(7) |
| 172 | : normalized; |
| 173 | const filename = basePath.split('/').pop() || basePath; |
| 174 | |
| 175 | return [ |
| 176 | `masks/${basePath}`, |
| 177 | `masks/${basePath}.png`, |
| 178 | `masks/${filename}`, |
| 179 | `masks/${filename}.png`, |
| 180 | ]; |
| 181 | } |
| 182 | |
| 183 | export function buildMaskUrlCandidates(maskUrlBase: string, imageName: string): UrlCandidate[] { |
| 184 | let normalizedName = normalizeImagePath(imageName); |
no test coverage detected