Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix getJpegInfo to skip DHT marker #3667

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/modules/jpeg_support.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ import { jsPDF } from "../jspdf.js";
"use strict";

/**
* 0xc0 (SOF) Huffman - Baseline DCT
* 0xc1 (SOF) Huffman - Extended sequential DCT
* 0xc0 (SOF0) Huffman - Baseline DCT
* 0xc1 (SOF1) Huffman - Extended sequential DCT
* 0xc2 Progressive DCT (SOF2)
* 0xc3 Spatial (sequential) lossless (SOF3)
* 0xc4 Differential sequential DCT (SOF5)
* 0xc5 Differential progressive DCT (SOF6)
* 0xc6 Differential spatial (SOF7)
* 0xc7
* 0xc4 Define Huffman Tables (DHT) - skip
* 0xc5 Differential sequential DCT (SOF5)
* 0xc6 Differential progressive DCT (SOF6)
* 0xc7 Differential spatial (SOF7)
*/
var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7];
var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc5, 0xc6, 0xc7];

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