MCPcopy Index your code
hub / github.com/tensorflow/tfjs / decodePng

Method decodePng

tfjs-node/src/nodejs_kernel_backend.ts:366–373  ·  view source on GitHub ↗
(contents: Uint8Array, channels: number)

Source from the content-addressed store, hash-verified

364 }
365
366 decodePng(contents: Uint8Array, channels: number): Tensor3D {
367 const opAttrs =
368 [{name: 'channels', type: this.binding.TF_ATTR_INT, value: channels}];
369 const inputArgs = [scalar(contents, 'string')];
370
371 return this.executeSingleOutput('DecodePng', opAttrs, inputArgs) as
372 Tensor<Rank.R3>;
373 }
374
375 decodeBmp(contents: Uint8Array, channels: number): Tensor3D {
376 const opAttrs =

Callers 2

image_test.tsFile · 0.80
decodePngFunction · 0.80

Calls 2

executeSingleOutputMethod · 0.95
scalarFunction · 0.90

Tested by

no test coverage detected