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

Function shouldResizeImageBitmap

src/hooks/asyncImageDecode.ts:122–127  ·  view source on GitHub ↗
(
  bitmap: Pick<ImageBitmap, 'width' | 'height'>,
  maxSize: number
)

Source from the content-addressed store, hash-verified

120}
121
122export function shouldResizeImageBitmap(
123 bitmap: Pick<ImageBitmap, 'width' | 'height'>,
124 maxSize: number
125): boolean {
126 return bitmap.width > maxSize || bitmap.height > maxSize;
127}
128
129export async function resizeImageBitmapToMaxSizeWithTimeout(
130 bitmap: ImageBitmap,

Calls

no outgoing calls

Tested by

no test coverage detected