1 | static byte[] isJPEG_magic = bytesFromHex("FFD8FF");
|
2 | |
3 | static bool isJPEG(byte[] data) {
|
4 | ret byteArrayStartsWith(data, isJPEG_magic); |
5 | } |
6 | |
7 | static bool isJPEG(File f) {
|
8 | ret isJPEG(loadBeginningOfBinaryFile(f, l(isJPEG_magic))); |
9 | } |
Began life as a copy of #1004676
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1009031 |
| Snippet name: | isJPEG - tests using magic bytes |
| Eternal ID of this version: | #1009031/4 |
| Text MD5: | b0d2164db37bc5af9c01c1850a8092f3 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-08-15 20:41:18 |
| Source code size: | 237 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 822 / 898 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |