Changeset 11660
- Timestamp:
- 19 May 2014, 17:30:44 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.py
r11476 r11660 619 619 620 620 621 def imghdr_test_fpm(h, f): 622 """FPM fileformat test. 623 624 The `fpm` fileformat is the binary fingerprint data as created by 625 `libfprint`. 626 """ 627 if len(h) >= 3 and h[:3] == 'FP1': 628 return 'fpm' 629 630 631 #: Add test function in stdlib's imghdr tests. 632 imghdr.tests.append(imghdr_test_fpm) 633 634 621 635 def get_fileformat(path, bytestream=None): 622 636 """Try to determine the file format of a given media file. … … 632 646 file-format can be recognized, ``None`` else. 633 647 634 Tested recognized filetypes currently are `jpg`, `png`, and `pdf`. 648 Tested recognized filetypes currently are `jpg`, `png`, `fpm`, and 649 `pdf`. 635 650 636 651 More filetypes (though untested in waeup.kofa) are automatically
Note: See TracChangeset for help on using the changeset viewer.