filetype.py icon indicating copy to clipboard operation
filetype.py copied to clipboard

Match against all 8 PNG file signature bytes

Open sudhir-b opened this issue 1 year ago • 3 comments

Update the PNG matcher to match all 8 bytes of the PNG signature as in: https://www.w3.org/TR/png/#5PNG-file-signature

I'm not sure that this makes any functional difference but spotted a discrepancy and thought I'd open this PR for completeness.

As an aside, it looks like the APNG matcher matches against an identical bytearray to begin with - is there a reason for this difference in the two matchers?

sudhir-b avatar Sep 24 '24 23:09 sudhir-b

APNG matcher was made by me and i forgot(?) to edit PNG matcher Feel free to edit APNG matcher to use if instead of bytearray

CatKasha avatar Oct 02 '24 21:10 CatKasha

Done, thanks for looking - is anything else I need to do?

sudhir-b avatar Oct 03 '24 22:10 sudhir-b

Looks good to me

CatKasha avatar Oct 04 '24 00:10 CatKasha