MCPcopy
hub / github.com/donmccurdy/glTF-Transform / getSize

Method getSize

packages/core/src/utils/image-utils.ts:116–119  ·  view source on GitHub ↗

Returns the dimensions of the image.

(buffer: Uint8Array, mimeType: string)

Source from the content-addressed store, hash-verified

114
115 /** Returns the dimensions of the image. */
116 public static getSize(buffer: Uint8Array, mimeType: string): vec2 | null {
117 if (!this.impls[mimeType]) return null;
118 return this.impls[mimeType].getSize(buffer);
119 }
120
121 /**
122 * Returns a conservative estimate of the number of channels in the image. For some image

Callers 1

getVRAMByteLengthMethod · 0.95

Calls 1

getSizeMethod · 0.65

Tested by

no test coverage detected