isPng static method
Check whether the picture is png.
Implementation
static bool isPng(List<int>? imageData) {
if (imageData != null && imageData.length >= _pngSignature.length) {
for (int i = 0; i < _pngSignature.length; i++) {
if (_pngSignature[i] != imageData[i]) {
return false;
}
}
return true;
} else {
return false;
}
}