png_colour_type

Gets the colour type of a PNG

Usage no npm install needed!

<script type="module">
  import pngColourType from 'https://cdn.skypack.dev/png_colour_type';
</script>

README

png-colour-type

Gets the colour type of a PNG

Usage:

asynchronous

Errors are reported, except for close error.

var png_colour_type = require('png_colour_type');

png_colour_type.withPromise('path/to/file.png')
.then(colourType => {
    // something something darkside.
});
synchronous

For simplistity and less overhead, there is no internal catching of file system errors.

var png_colour_type = require('png_colour_type');

var colourType = png_colour_type('path/to/file.png');