Thanks all for the suggestions. I've run a number of additional tests since my last post. After following the suggestions above and removing pretty much every part of the command and slowly adding it back, I found that everything went fine and I didn't get any images with lines, until the very last step when I added the "-limit memory 512mb" back into the command.
So no lines with:
Code: Select all
convert -limit map 512mb -limit thread 1 '1000.jpg' -scale '2000x2000' -flatten -quality 85 output/testImage1.jpg
But do get lines with:
Code: Select all
convert -limit map 512mb -limit memory 512mb -limit thread 1 '1000.jpg' -scale '2000x2000' -flatten -quality 85 output/testImage1.jpg
snibgo wrote:The posted example testimage121.jpg is 2000x2000 pixels, and has the line at y=1411. Is the line always in ths position?
No, the line is neither always in this position nor is it always this color. It may be near the top, near the bottom, or somewhere in the middle. It may be white, gray, or black. The only consistent thing is that it is always horizontal.
[quote=""fmw42"]Do you have plenty of space in your tmp directory? Where are your IM temp files going?[/quote]
Yes, the server has 23G of free space. I'm not certain where the IM temp files are going, I assume they are going to /tmp if it's even using tmp files at all. My understanding is that if the pixel cache has to go to the disk the process is 1,000 times slower. Right now it's moving along at a reasonable speed so I assume we're not using disk.
Another note, I don't think it's the OS. I spun up an Ubuntu 15.10 server (also in Amazon EC2) and installed the package managers version of ImageMagick: IM 6.8.9-9 and the 887th image has a line in it (using the second command from above). I guess I could update that to the newest version of IM to be sure we're getting apples to apples on that test but I was just trying to get a quick peak at what would happen on a different OS.
I recall that earlier we removed the -scale and the line problem also went away so it seems to me that we've triangulate the issue to using "-scale" with "-memory limit". All of these tests were performed in the amazon EC2 environment. I'd be slow to point a finger at the virtualization platform but I guess it is worth noting that is one variable that has not been tested. I'm currently running an enormous batch of images with the "successful" command to ensure that we really do have a no line command. If that succeeds I'll plan to run another batch of images with the memory limit in and -scale out. Hopefully with that triangulated we can figure out why memory limit with -scale causes the lines since omitting the memory limit isn't really going to be an option in our current environment.