Page 3 of 3
Re: Occational random line through images
Posted: 2016-04-22T18:23:53-07:00
by magick
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
Posted: 2016-04-22T19:30:20-07:00
by fmw42
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.
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?
Re: Occational random line through images
Posted: 2016-04-23T04:57:19-07:00
by magick
Yes. Many times. No lines are showing up.
Re: Occational random line through images
Posted: 2016-04-25T10:47:36-07:00
by XDAMDaniel
After looking through all the replies I noticed this little note.
magick wrote:Note, 512MB is very different from 512mb.
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:
Code: Select all
convert -limit map 512MB -limit memory 512MB -limit thread 1 1000.jpg \
-scale '2000x2000' -flatten -quality 85 output/testImage1.jpg
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:
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
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:
Code: Select all
./configure --prefix=/usr --disable-openmp --with-gs-font-dir=/usr/share/fonts/default/Type1 --libdir=/usr/lib64
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.
Re: Occational random line through images
Posted: 2016-05-07T07:44:44-07:00
by magick
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.
Re: Occational random line through images
Posted: 2016-05-09T10:14:01-07:00
by XDAMDaniel
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:
Code: Select all
./configure --prefix=/usr --disable-openmp --with-gs-font-dir=/usr/share/fonts/default/Type1 --libdir=/usr/lib64
and with --disable-shared:
Code: Select all
./configure --prefix=/usr --disable-openmp --disable-shared --with-gs-font-dir=/usr/share/fonts/default/Type1 --libdir=/usr/lib64
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:
Code: Select all
convert -limit map 512mb -limit memory 512mb -limit thread 1 1000.jpg -scale '2000x2000' -flatten -quality 85 output/testImage1.jpg
While this command does not produce any lines:
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
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
Re: Occational random line through images
Posted: 2016-05-09T10:27:21-07:00
by fmw42
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.
Re: Occational random line through images
Posted: 2016-05-09T10:58:10-07:00
by XDAMDaniel
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:
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
Thanks for alerting me to that mistake.
Re: Occational random line through images
Posted: 2016-05-09T12:08:51-07:00
by magick
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.