ImageMagick convert command produces a slight error
First, shouldn't your example be :

convert ex.gif my_png_files_%d.png


as the input file is the GIF?

Could this be an anti-aliasing problem? Have you tried

convert ex.gif +antialiasing my_png_files_%d.png


I assume you have read the manual or the local copy at file:///opt/local/share/doc/ImageMagick-6.8.0/www/convert.html

EDIT: It turned out to be a geometry problem and the answer found here https://stackoverflow.com/questions/12791505/how-to-extract-frames-from-a-gif-file-preserving-frame-dimensions was to change the command to 

convert -coalesce ex.gif +antialiasing my_png_files_%d.png