png_sig_cmp

Name

png_sig_cmp -- match the PNG signature

Synopsis

#include <png.h>

int png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check);

Description

png_sig_cmp() checks whether the given number of bytes match the PNG signature starting from the start position. The function shall return non-zero if num_to_check == 0 or start > 7.

Return Value

Zero - the given number of bytes starting from start position match the respective bytes of the PNG signature. Non-zero - the given number of bytes starting from start position do not match the respective bytes of the PNG signature or num_to_check == 0 or start > 7.