Skip to content

Commit 0d4bddd

Browse files
committed
fix getJpegInfo to skip DHT marker
1 parent caf5159 commit 0d4bddd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/modules/jpeg_support.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ import { jsPDF } from "../jspdf.js";
1717
"use strict";
1818

1919
/**
20-
* 0xc0 (SOF) Huffman - Baseline DCT
21-
* 0xc1 (SOF) Huffman - Extended sequential DCT
20+
* 0xc0 (SOF0) Huffman - Baseline DCT
21+
* 0xc1 (SOF1) Huffman - Extended sequential DCT
2222
* 0xc2 Progressive DCT (SOF2)
2323
* 0xc3 Spatial (sequential) lossless (SOF3)
24-
* 0xc4 Differential sequential DCT (SOF5)
25-
* 0xc5 Differential progressive DCT (SOF6)
26-
* 0xc6 Differential spatial (SOF7)
27-
* 0xc7
24+
* 0xc4 Define Huffman Tables (DHT) - skip
25+
* 0xc5 Differential sequential DCT (SOF5)
26+
* 0xc6 Differential progressive DCT (SOF6)
27+
* 0xc7 Differential spatial (SOF7)
2828
*/
29-
var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7];
29+
var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc5, 0xc6, 0xc7];
3030

3131
//takes a string imgData containing the raw bytes of
3232
//a jpeg image and returns [width, height]

0 commit comments

Comments
 (0)