I suspect that something has changed in Imagemagick whereby it no longer properly switches over to single threaded libjpeg in a multi-threaded environment. You probably were never getting multi-threaded conversion to jpg.
I also sent him a note to review this post when he gets time.
Rotate image causes black bars and corruption
Re: Rotate image causes black bars and corruption
Post the output of `convert -list format` just for JPEG. It tells us which JPEG library you are using. Are you using libjpeg Turbo?
Edit coders/jpeg.c and force NoThreadSupport in RegisterJPEGImage(), there are about 4 places that its conditionally compiled. That should likely fix the problem. If so, let us know and we will adjust the conditional compile of thread support.
Edit coders/jpeg.c and force NoThreadSupport in RegisterJPEGImage(), there are about 4 places that its conditionally compiled. That should likely fix the problem. If so, let us know and we will adjust the conditional compile of thread support.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Rotate image causes black bars and corruption
Magick, for my own understanding, is libjpeg multi-threaded or not. He wants to be able to use all 24 processors. He tested -limit thread 1 and it worked fine. But with more than one thread it failed. He said multi-threading worked fine up til 6.9.4.2.
Re: Rotate image causes black bars and corruption
Here is the JPEG info shown from `convert -list format`magick wrote:Post the output of `convert -list format` just for JPEG. It tells us which JPEG library you are using. Are you using libjpeg Turbo?
JPE* rw- Joint Photographic Experts Group JFIF format (80)
JPEG* rw- Joint Photographic Experts Group JFIF format (80)
JPG* rw- Joint Photographic Experts Group JFIF format (80)
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Rotate image causes black bars and corruption
There is a more current version of libjpeg. I am on 90.
Re: Rotate image causes black bars and corruption
It seems like this doesn't fix the issue, but instead simply gets rid of thread support. Is that really the solution here?magick wrote:Edit coders/jpeg.c and force NoThreadSupport in RegisterJPEGImage(), there are about 4 places that its conditionally compiled. That should likely fix the problem. If so, let us know and we will adjust the conditional compile of thread support.
Re: Rotate image causes black bars and corruption
It looks like we're actually using jpeg-turbo, and it’s on 1.4.2.fmw42 wrote:There is a more current version of libjpeg. I am on 90.
Re: Rotate image causes black bars and corruption
Let's see if we can identify which auto-orient algorithm is failing. Try each of these commands and let us know which one returns black bars:
Also, post the output of this command:
- convert image.jpg -resize 100% clone.jpg
convert image.jpg -flop flop.jpg
convert image.jpg -rotate 180 rot180.jpg
convert image.jpg -flip flip.jpg
convert image.jpg -transpose transpose.jpg
convert image.jpg -rotate 90 rot90.jpg
convert image.jpg -transverse transverse.jpg
convert image.jpg -rotate 270 rot270.jpg
Also, post the output of this command:
- convert -list configure
Re: Rotate image causes black bars and corruption
Download and install ImageMagick 6.9.4-8 or 7.0.1-10. Do you still get black bars?