MCPcopy Index your code
hub / github.com/CesiumGS/obj2gltf / parsePng

Function parsePng

lib/loadTexture.js:84–94  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

82}
83
84function parsePng(data) {
85 return new Promise(function (resolve, reject) {
86 new PNG().parse(data, function (error, decodedResults) {
87 if (defined(error)) {
88 reject(error);
89 return;
90 }
91 resolve(decodedResults);
92 });
93 });
94}
95
96function decodePng(texture, options) {
97 // Color type is encoded in the 25th bit of the png

Callers 1

decodePngFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected