MCPcopy
hub / github.com/nodeca/pica / resize_math

Function resize_math

src/pica_worker.ts:12–18  ·  view source on GitHub ↗
(data: { features: PicaFeaturesFlat }, tileJob: MathResizeAndUnsharpOptions)

Source from the content-addressed store, hash-verified

10let mathLib: MathLib | null = null
11
12function resize_math (data: { features: PicaFeaturesFlat }, tileJob: MathResizeAndUnsharpOptions): Uint8Array {
13 if (!mathLib) mathLib = new MathLib(data.features)
14
15 // Use multimath's sync auto-init. Avoid Promise use in old browsers,
16 // because polyfills are not propagated to webworker.
17 return mathLib.resizeAndUnsharp(tileJob)
18}
19
20function resizeBitmap (data: WorkerResizePayload, tileJob: TileResizeBitmapJob): void {
21 let srcCanvas: OffscreenCanvas | null = new OffscreenCanvas(tileJob.width, tileJob.height)

Callers 2

resizeBitmapFunction · 0.85
resizeFunction · 0.85

Calls 1

resizeAndUnsharpMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…