MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / getPreferredImageLookupKeys

Function getPreferredImageLookupKeys

src/utils/imageFileUtils.ts:111–127  ·  view source on GitHub ↗
(normalizedName: string)

Source from the content-addressed store, hash-verified

109}
110
111function getPreferredImageLookupKeys(normalizedName: string): string[] {
112 const keys: string[] = [];
113 const addKey = (key: string) => {
114 if (!key || keys.includes(key)) return;
115 keys.push(key);
116 const lowerKey = key.toLowerCase();
117 if (lowerKey !== key && !keys.includes(lowerKey)) {
118 keys.push(lowerKey);
119 }
120 };
121
122 if (!normalizedName.toLowerCase().startsWith('images/')) {
123 addKey(`images/${normalizedName}`);
124 }
125 addKey(normalizedName);
126 return keys;
127}
128
129/**
130 * Diagnostic function: Find images that don't have corresponding files.

Callers 1

getImageFileFunction · 0.85

Calls 1

addKeyFunction · 0.85

Tested by

no test coverage detected