Occational random line through images
Re: Occational random line through images
If it fails, wouldn't it still report an exception? We pass the exception in the recursive call. We'll add a patch to return NULL if an exception is thrown.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Occational random line through images
Just curious if you have tried running his command in a loop over many iterations on his type platform to see if you get any lines to show up?magick wrote:If it fails, wouldn't it still report an exception? We pass the exception in the recursive call. We'll add a patch to return NULL if an exception is thrown.
Re: Occational random line through images
Yes. Many times. No lines are showing up.
-
- Posts: 14
- Joined: 2016-04-18T11:43:02-07:00
- Authentication code: 1151
Re: Occational random line through images
After looking through all the replies I noticed this little note.
No lines, ran it several more iterations of 1,000 times still no lines. It seems that the difference between "mb" and "MB" may be to blame for our problems. I looked through the docs and man page but don't see anything that mentions a difference. Our team was able to come up with some possible differences such as megabit vs megabyte and megabyte vs mebibyte. Could you help us understand the difference between "mb" and "MB".
Regarding duplicating the issue here is my sample script that can be used to replicate the problem:
And here is the sample image I used to replicate the problem: https://www.dropbox.com/s/rpg9uja8s56fi7i/1000.jpg?dl=0
If this does not work to replicate the line you can contact me directly. We may be able to get you connected into an environment we have specifically setup to trouble shoot this problem.
Also as a note we always disable OpenMP when we build ImageMagick. Here is our configure command:
I did notice we are using a different switch to disable it from the one mentioned. I can try to rebuild it with the alternate switch if that seems like it would be worth trying.
I also noticed that the sample script is using "MB" and we are using "mb" in our command. So I tried the following 1000 times:magick wrote:Note, 512MB is very different from 512mb.
Code: Select all
convert -limit map 512MB -limit memory 512MB -limit thread 1 1000.jpg \
-scale '2000x2000' -flatten -quality 85 output/testImage1.jpg
Regarding duplicating the issue here is my sample script that can be used to replicate the problem:
Code: Select all
#!/bin/csh
convert -limit map 512mb -limit memory 512mb -limit thread 1 1000.jpg \
-scale '2000x2000' -flatten -quality 85 output/reference.jpg
set i = 0
while ( $i < 1000 )
echo -n "$i "
convert -limit map 512mb -limit memory 512mb -limit thread 1 1000.jpg \
-scale '2000x2000' -flatten -quality 85 output/testImage$i.jpg
compare -metric rmse output/testImage$i.jpg output/reference.jpg null:
echo ""
@ i ++
end
If this does not work to replicate the line you can contact me directly. We may be able to get you connected into an environment we have specifically setup to trouble shoot this problem.
Also as a note we always disable OpenMP when we build ImageMagick. Here is our configure command:
Code: Select all
./configure --prefix=/usr --disable-openmp --with-gs-font-dir=/usr/share/fonts/default/Type1 --libdir=/usr/lib64
Re: Occational random line through images
We added two patches to ImageMagick 7.0.1-2 and 6.9.4-0, available by sometime tomorrow, that may address this problem. Give it a try and let us know if you continue to get random lines.
-
- Posts: 14
- Joined: 2016-04-18T11:43:02-07:00
- Authentication code: 1151
Re: Occational random line through images
I installed ImageMagick 7.0.1-2 on the server this morning and ran several tests of 1,000 images. I'm still seeing images that are produced with lines in them. I tried building it with our standard configure command:
and with --disable-shared:
I get the same results either way. Additionally, I continue to observe that the lower case "mb" in the memory limit seems to the cause of the line issue whereas the capital "MB" does not.
This command produces the lines:
While this command does not produce any lines:
Here is my sample line producing script:
Here are a couple sample images with lines:
https://www.dropbox.com/s/mtrwu8573ikfp ... 0.jpg?dl=0
https://www.dropbox.com/s/4y9ug7df67mpn ... 1.jpg?dl=0
Here is the sample original image:
https://www.dropbox.com/s/rpg9uja8s56fi7i/1000.jpg?dl=0
Code: Select all
./configure --prefix=/usr --disable-openmp --with-gs-font-dir=/usr/share/fonts/default/Type1 --libdir=/usr/lib64
Code: Select all
./configure --prefix=/usr --disable-openmp --disable-shared --with-gs-font-dir=/usr/share/fonts/default/Type1 --libdir=/usr/lib64
This command produces the lines:
Code: Select all
convert -limit map 512mb -limit memory 512mb -limit thread 1 1000.jpg -scale '2000x2000' -flatten -quality 85 output/testImage1.jpg
Code: Select all
convert -limit map 512MB -limit memory 512MB -limit thread 1 1000.jpg -scale '2000x2000' -flatten -quality 85 output/testImage1.jpg
Here is my sample line producing script:
Code: Select all
#!/bin/csh
convert -limit map 512MB -limit memory 512MB -limit thread 1 1000.jpg \
-scale '2000x2000' -flatten -quality 85 output/reference.jpg
set i = 0
while ( $i < 1000 )
echo -n "$i "
convert -limit map 512MB -limit memory 512MB -limit thread 1 1000.jpg \
-scale '2000x2000' -flatten -quality 85 output/testImage$i.jpg
compare -metric rmse output/testImage$i.jpg output/reference.jpg null:
echo ""
@ i ++
end
https://www.dropbox.com/s/mtrwu8573ikfp ... 0.jpg?dl=0
https://www.dropbox.com/s/4y9ug7df67mpn ... 1.jpg?dl=0
Here is the sample original image:
https://www.dropbox.com/s/rpg9uja8s56fi7i/1000.jpg?dl=0
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Occational random line through images
Your script has both commands using MB. Should not one of them be using mb?
I suspect that MB means mega Bytes and mb means mega bits. So the latter is using 8 time less resources.
I suspect that MB means mega Bytes and mb means mega bits. So the latter is using 8 time less resources.
-
- Posts: 14
- Joined: 2016-04-18T11:43:02-07:00
- Authentication code: 1151
Re: Occational random line through images
Yes you are correct. I pasted the wrong script in. That was the script that works successfully without producing lines. The problem script should be:
Thanks for alerting me to that mistake.
Code: Select all
#!/bin/csh
convert -limit map 512MB -limit memory 512MB -limit thread 1 1000.jpg \
-scale '2000x2000' -flatten -quality 85 output/reference.jpg
set i = 0
while ( $i < 1000 )
echo -n "$i "
convert -limit map 512mb -limit memory 512mb -limit thread 1 1000.jpg \
-scale '2000x2000' -flatten -quality 85 output/testImage$i.jpg
compare -metric rmse output/testImage$i.jpg output/reference.jpg null:
echo ""
@ i ++
end
Re: Occational random line through images
Ran your script. It completed without complaint with a metric of 0 as expected. Until we can reproduce this problem, we are unable to offer additional help.