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

Function extractZipImage

src/utils/zipArchiveState.ts:98–114  ·  view source on GitHub ↗
(imageName: string)

Source from the content-addressed store, hash-verified

96 * Extract an image from the active ZIP archive.
97 */
98export async function extractZipImage(imageName: string): Promise<File | null> {
99 if (!activeArchive || !activeImageIndex) {
100 return null;
101 }
102
103 const entry = findZipEntry(imageName, activeImageIndex);
104 if (!entry) {
105 return null;
106 }
107
108 try {
109 return await entry.extract();
110 } catch (err) {
111 appLogger.warn(`[ZIP] Failed to extract ${imageName}:`, err);
112 return null;
113 }
114}

Callers 3

fetchZipImageFunction · 0.85
fetchZipImageRawFunction · 0.85

Calls 2

findZipEntryFunction · 0.85
extractMethod · 0.80

Tested by

no test coverage detected