Message184742
| Author |
kovid |
| Recipients |
ezio.melotti, jcea, joril, kovid |
| Date |
2013年03月20日.06:23:28 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1363760609.19.0.758706416887.issue16512@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The attached patch is insufficient, for example, it fails on http://nationalpostnews.files.wordpress.com/2013/03/budget.jpeg?w=300&h=1571
Note that the linux file utility identifies a files as "JPEG Image data" if the first two bytes of the file are \xff\xd8.
A slightly stricter test that catches more jpeg files:
def test_jpeg(h, f):
if (h[6:10] in (b'JFIF', b'Exif')) or (h[:2] == b'\xff\xd8' and b'JFIF' in h[:32]):
return 'jpeg' |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年03月20日 06:23:29 | kovid | set | recipients:
+ kovid, jcea, ezio.melotti, joril |
| 2013年03月20日 06:23:29 | kovid | set | messageid: <1363760609.19.0.758706416887.issue16512@psf.upfronthosting.co.za> |
| 2013年03月20日 06:23:29 | kovid | link | issue16512 messages |
| 2013年03月20日 06:23:28 | kovid | create |
|