Corrupt images - Windows only outputs BMP images
See original GitHub issue var camOpts = { width: 1920, height: 1080, delay: 0, quality: 100, callbackReturn: "location", output: "jpeg", device: false, verbose: true }
I’m not sure if its due to the content-type not properly populating, or if its just poor encoding, but the image file gathered is corrupt and therefore can’t be used for delivery to an API. Any workaround for this?
When uploading to S3, the content-type is shown as application.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Repair BMP Files: 5 Ways To Fix Corrupted
This repair tool has the best features with the help of which it becomes so easy to repair corrupt BMP files. It not...
Read more >How To Fix "Windows Photo Viewer can't open this picture"
Open photo in different application Windows Photo Viewer supports only JPEG, TIFF, PNG, GIF, BMP, DIB, and WDP file formats.
Read more >Corrupt Pictures - Microsoft Community
Corrupt Pictures. I keep finding pictures (jpg's) which cannot be opened. Windows 10 is reporting the file is "not a valid bitmap file,...
Read more >Large generated BMP file corrupted - Stack Overflow
Your second image is 100001×100001, i.e., 10 gigapixels. While I can't find an official statement online about the maximum allowed size of a ......
Read more >How to Repair Unreadable Corrupt Pictures
Photos may become unreadable and cannot open due to corruption? Learn here 5 methods to fix unreadable corrupt pictures.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
having some sort of image post processing would be nice. We could get around a lot of issues like this and anybody trying to do effects that one camera implementation might have and other not. I’ll keep jimp in mind thanks. Code wise an error for an invalid type is probably better then the current bmp with a .jpg extension.
For anyone having the same issue, node-webcam on windows produces bmp images only, and width, height and quality options don’t work.
To solve this I installed jimp, it allows to manipulate the bitmap, convert it to jpg, set the quality and size and a lot of other things.
@CodeSpent we may close this issue for now 👍
For anyone strugling with this, here is a sample of what I did using Promises: