jpeg-autorotate | 📸 Node module to rotate JPEG images | Computer Vision library
kandi X-RAY | jpeg-autorotate Summary
kandi X-RAY | jpeg-autorotate Summary
A node module to rotate JPEG images based on EXIF orientation.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Rotate the image from the given EXIF buffer
- Rotate the given buffer .
- Extract the orientation tag from the given data
- Read a file or Buffer
- Flip a buffer horizontally
- Rotate the buffer
- Get number from options
- Read EXIF data from buffer
- Rotate a buffer
- Apply styles to a string
jpeg-autorotate Key Features
jpeg-autorotate Examples and Code Snippets
Community Discussions
Trending Discussions on jpeg-autorotate
QUESTION
My app tries to rotate images based on exif data.
I keep getting requests about jpegtran complaining about ’invalid SOS parameter for sequential jpeg” and jhead aborting operation. Apparently this is not even a fatal warning, and many forums give instructions on how to ignore it?
Invalid SOS parameters for sequential JPEG
Any ideas on how to get jpegtran to completely ignore this warning and process the images anyway? I have an issue with sample images here https://github.com/savolai/JPEG-Autorotate/issues/1
I thought already to first convert the image to non-progressive using jpegtran, but it complains even then and refuses to do it. .\jpegtran.exe .\testimages\invalid-sos-parameters-progressive-jpeg\20180516_14530 8.jpg > .\testimages\invalid-sos-parameters-progressive-jpeg\nonprog.jpg
Does anyone know any other binaries or ways to get jpegtran.exe to ignore the error? Or do you know if mozjpeg jpegtran is more lax about this?
...ANSWER
Answered 2018-Dec-07 at 20:18I suspect that the source of the problem is that the spectral selection fields in the SOS marker are set to zero. These fields are meaningless in sequential JPEG but the standard says the values should be set to 0 and 63. Some JPEG references one sees on the internet say these values are ignored. Probably some encoders do not set them.
You might want to run a JPEG dumping program on your images to see if your spectral selection values are set to zero and 63. If they are not, you can write a relatively simple filter program that copies the JPEG stream while changing the spectral selection values.
I expect that the JPEGTRAN source code is online. If I am correct that it is making this needless check, you could build your own version with this commented out.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jpeg-autorotate
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page