PNGUtils
This PNGUtils class use pngjs3 for png parsing and transform png data from fetch.
Constructor Summary
Public Constructor | ||
public |
|
Method Summary
Public Methods | ||
public |
async fetchPNG(url: URL ): Promise fetch and tranform png file to raw array from url |
|
public |
async readPNG(filePath: String ): Promise read and tranform png file to raw array from filepath |
|
public |
async writePNG(url: URL ): Promise write and tranform png file to raw array from filepath |
Public Constructors
public constructor() source
Public Methods
public async fetchPNG(url: URL ): Promise source
fetch and tranform png file to raw array from url
Params:
Name | Type | Attribute | Description |
url | URL | url for PNG file |
Return:
Promise | data promise - return Array if success or reject with error message |
public async readPNG(filePath: String ): Promise source
read and tranform png file to raw array from filepath
Params:
Name | Type | Attribute | Description |
filePath | String | url for PNG file |
Return:
Promise | data promise - return Array if success or reject with error message |
public async writePNG(url: URL ): Promise source
write and tranform png file to raw array from filepath
Params:
Name | Type | Attribute | Description |
url | URL | url for PNG file |
Return:
Promise | data promise - return Array if success or reject with error message |