Rotate image causes black bars and corruption
Re: Rotate image causes black bars and corruption
Well, I believe that this is a bug. I got so tired of messing with it that I moved down to ImageMagick 6.9.2-4 and tried it, and BAM it worked correctly again. I'll try to narrow it down to which version in between caused the break, but I believe that it is a bug at least in v6.9.4.3,1.
- 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
try 6.9.4.4 the current version. Perhaps 6.9.4.3 was transitory if they found a bug and immediately changed to 6.9.4.4, since I never got 6.9.4.3.
Re: Rotate image causes black bars and corruption
We'll give that a shot next week. Headed to bed for tonight! Thank you for the advice!
Re: Rotate image causes black bars and corruption
This morning we tested with the following builds:
6.9.3.3 -> good
6.9.3.9 -> still good
6.9.4.1 - still good
6.9.4.2 -> broke. black bars across rotated images.
6.9.4.3 -> still broke
6.9.4.4 -> still broke
6.9.4.5 -> still broke
Please look into this, as it appears to be a bug introduced in v6.9.4.2, and it still exists in the most recent build.
6.9.3.3 -> good
6.9.3.9 -> still good
6.9.4.1 - still good
6.9.4.2 -> broke. black bars across rotated images.
6.9.4.3 -> still broke
6.9.4.4 -> still broke
6.9.4.5 -> still broke
Please look into this, as it appears to be a bug introduced in v6.9.4.2, and it still exists in the most recent build.
- 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
Perhaps I have missed this, but could you post one of your images that fails and I will test it also.
Re: Rotate image causes black bars and corruption
Sure; the image is in the very first post.
- 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
Sorry, my browser did not display the images so I missed them. I have them now.
- 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
Each of these worked fine for me on my Mac OSX Q16 installs (with 2 threads) directly in a terminal window. I did not have a version of IM 6.9.4.3 to test.
im6933 convert image.jpg -auto-orient tmp6933.jpg
im6939 convert image.jpg -auto-orient tmp6939.jpg
im6941 convert image.jpg -auto-orient tmp6941.jpg
im6942 convert image.jpg -auto-orient tmp6942.jpg
im6944 convert image.jpg -auto-orient tmp6944.jpg
convert image.jpg -auto-orient tmp6945.jpg
Each did a proper auto-orient and each had no black areas.
I suspect it is your memory or tmp space that is getting exceeded or perhaps a bad memory chip.
What happens if you install as Q8? That would save memory.
Do you have another computer to test on?
im6933 convert image.jpg -auto-orient tmp6933.jpg
im6939 convert image.jpg -auto-orient tmp6939.jpg
im6941 convert image.jpg -auto-orient tmp6941.jpg
im6942 convert image.jpg -auto-orient tmp6942.jpg
im6944 convert image.jpg -auto-orient tmp6944.jpg
convert image.jpg -auto-orient tmp6945.jpg
Each did a proper auto-orient and each had no black areas.
I suspect it is your memory or tmp space that is getting exceeded or perhaps a bad memory chip.
What happens if you install as Q8? That would save memory.
Do you have another computer to test on?
- 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
Are you running this in a terminal or via PHP exec or Imagick. If not the terminal, then perhaps it is your PHP install or Imagick install.
Might you have a bad libjpeg install?
Might you have a bad libjpeg install?
Re: Rotate image causes black bars and corruption
We have tested this on 7 different servers, each running FreeBSD 10.2, and the same error occurs on each. The problem seems to only occur when it is running in multi-threaded mode. When we switch to "-limit thread 1" on the convert process it works without a problem. We tracked it down to which specific IM version it started failing on, and it started failing on 6.9.4.2.fmw42 wrote:Each of these worked fine for me on my Mac OSX Q16 installs directly in a terminal window. I did not have a version of IM 6.9.4.3 to test.
im6933 convert image.jpg -auto-orient tmp6933.jpg
im6939 convert image.jpg -auto-orient tmp6939.jpg
im6941 convert image.jpg -auto-orient tmp6941.jpg
im6942 convert image.jpg -auto-orient tmp6942.jpg
im6944 convert image.jpg -auto-orient tmp6944.jpg
convert image.jpg -auto-orient tmp6945.jpg
Each did a proper auto-orient and each had no black areas.
I suspect it is your memory or tmp space that is getting exceeded or perhaps a bad memory chip.
What happens if you install as Q8? That would save memory.
Do you have another computer to test on?
Re: Rotate image causes black bars and corruption
This has been tested using PHP exec AND Imagick. Both results are the same across all machines.fmw42 wrote:Are you running this in a terminal or via PHP exec or Imagick. If not the terminal, then perhaps it is your PHP install or Imagick install.
Might you have a bad libjpeg install?
- 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
Can you test directly in a terminal window? Otherwise, you will need help from the Imagemagick Developer about OpenMP. I would suggest you contact him (magick) on this forum via the message tool to get his attention about this. Seems to be specific to your OS, since it worked fine for me on my Mac OSX with 2 threads.
Re: Rotate image causes black bars and corruption
Alright, I have tested from the command line directly and got the same results. Here is the version information for the one I just tested:
This resulted in an image exactly as shown in the first post within this thread (black bars in the same positions even).
The command I ran wasVersion: ImageMagick 6.9.4-5 Q16 amd64 2016-05-31 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC OpenMP
Delegates (built-in): bzlib fontconfig jbig jng jp2 jpeg lcms png xml zlib
Code: Select all
convert 'image.jpg' -auto-orient 'image_rotated.jpg'
- 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
OK, you will need help from the Imagemagick Developer about OpenMP and your OS regarding this issue. It is clearly a threading issue on your OS. My guess is that the libjpeg delegate is not multi-threaded. Not sure why it worked on your one release.
Re: Rotate image causes black bars and corruption
Thank you for trying to help. I have sent a message to magick and we'll see what he thinks.fmw42 wrote:OK, you will need help from the Imagemagick Developer about OpenMP and your OS regarding this issue. It is clearly a threading issue on your OS. My guess is that the libjpeg delegate is not multi-threaded. Not sure why it worked on your one release.
Thanks!