This is because the image was antialiased against a particular background
color. That means that some of the pixels have a color which is partway
between the foreground color and the background color. For instance if you
had a red circle on a black background there would be pixels that were part
of the way between red and black producing a dark red. This looks great on
a black background but on a white background the circle looks like it has a
dark halo around it.
You will need to choose the background you are going to use before you create
your image if you want it to use antialiasing. Otherwise just use hard edges
and the image won't look quite as bad with arbitrary backgrounds.