I understand. ImageMagick is an external app and you can't predict its output. The only thing you could do is let Convert process the image, analyze the result, and re-do the process. Too bad convert doesn't have a test mode so you can just see what it's going to do.
I think auto-level may be closer to what is described as color balancing.
I've seen that +repage is needed for operations that affect the size of the image, such as trimming. Have you tried that to see if it helps with the gif issue?
http://www.imagemagick.org/discourse...hp?f=1&t=14942