We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a07d97a commit b307adbCopy full SHA for b307adb
addons/addon-image/src/IIPMetrics.ts
@@ -32,13 +32,8 @@ export function imageType(d: Uint8Array): IMetrics {
32
height: d[20] << 24 | d[21] << 16 | d[22] << 8 | d[23]
33
};
34
}
35
- // JPEG: FF D8 FF E0 xx xx JFIF or FF D8 FF E1 xx xx Exif 00 00
36
- if ((d32[0] === 0xE0FFD8FF || d32[0] === 0xE1FFD8FF)
37
- && (
38
- (d[6] === 0x4a && d[7] === 0x46 && d[8] === 0x49 && d[9] === 0x46)
39
- || (d[6] === 0x45 && d[7] === 0x78 && d[8] === 0x69 && d[9] === 0x66)
40
- )
41
- ) {
+ // JPEG: FF D8 FF
+ if (d[0] === 0xFF && d[1] === 0xD8 && d[2] === 0xFF) {
42
const [width, height] = jpgSize(d);
43
return { mime: 'image/jpeg', width, height };
44
0 commit comments