jsPDF images are corrupted when using large, smartphone-captured jpegs
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 31.3k
- Forks
- 4.8k
- PR merge metrics
- No merged PRs in 30d
Description
I've been trying to use the version 2.4.0 of jspdf to create a PDF containing images. However, the images are corrupted (basically just vertical stripes of grey).
The issues appears to be mainly affect jpegs that are captured from the camera directly. If you take a picture, crop it a little bit smaller and re-save it then it normally displays OK.
I've got a demo hosted at: https://upbeat-franklin-22e659.netlify.app/ that's written in knockout.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the hosted demo and a large, smartphone-captured JPEG using jsPDF 2.4.0. Compare that result with a cropped and re-saved JPEG, then trace the image-handling entry point involved. Done means the original large JPEG renders correctly in the generated PDF without vertical grey stripes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100