node-libpng
Version:
Unofficial bindings for node to libpng.
12 lines (11 loc) • 362 B
TypeScript
/// <reference types="node" />
/**
* Will check if the provided buffer contains a PNG image.
* Under the hood this will call `png_sig_cmp` and check for the
* header of the buffer.
*
* @param buffer The buffer to check.
*
* @return `true` if the file was a PNG image file and `false` otherwise.
*/
export declare function isPng(buffer: Buffer): boolean;