Closed photopea closed 7 years ago
Hello, the library cannot run in the browser directly from the source. You can either use a module bundler like browserify or webpack in your project or load it directly from a browserify CDN
By the way, can you test, if your decoder can correctly decode this file?
No, sorry. I haven't had time to add support for palette-based images.
@photopea I added basic support for palettes in v1.1.0. The decoded image will have two properties:
image.palette
: an array of arrays. Each element contains the RGB valuesimage.data
an array of color indexes referring to the palette arrayBTW. I decided to make my own PNG parser. Unlike your library, it fully supports PNG format, including all color depths and interlacing. https://github.com/photopea/UPNG.js .
BTW. why do you develop these parsers? Do you use them in any specific product?
Hi, can you make it work in a web browser? I am getting a following error: PNGDecoder.js:3 Uncaught ReferenceError: require is not defined