well, this is a common problem when you convert an image to Gif animation the edges goes distorted sometime.So here are some soloutions to that.
Method 1(quick one)
To export the gif go to the file menu and then select save as web.
Press the 2-Up tab and click on the right half to select it.
On settings select GIF from the dropdown menu on the left top, then click the drop menu in top center on which the default name is “unnamed”and select the GIF 128 dithered…You should see the result on the right half…Note that you can select the other predefined settings there to get good result with minimum size, if its not the deal of size then 128 dither is the good.
I personally use always the 24bit PNG where i need the transparency in still images because the result produced by it is lot more better than the gif.
Method 2 is that you play with the settings and see how its producing the results in the output.
Some tips related to the settings are here
The top left dropdown is used to select the format in which you want conversion
Lossy: it makes the edges more sharp and rough also effects on colors, this is useful when you are using the text layer on the transparent bg…so it looks more sharper. 0 means not lossy at all and 100 value means lossy to maximum.
The second left dropdown from top is used to select the color palette means to selecting the colors which would be used in the output, here is little description of the each palette types.
Creates a custom palette by giving priority to colors for which the human eye has greater sensitivity.
Creates a color table similar to the Perceptual color table, but favoring broad areas of color and the preservation of Web colors. This option usually produces images with the greatest color integrity.
Creates a palette by sampling the colors from the spectrum appearing most commonly in the image. For example, an RGB image with only the colors green and blue produces a palette made primarily of greens and blues. Most images concentrate colors in particular areas of the spectrum. To control a palette more precisely, first select a part of the image containing the colors you want to emphasize. Photoshop weights the conversion toward these colors.
Uses the 216-color palette that Web browsers, regardless of platform, use to display images on a monitor limited to 256 colors. This palette is a subset of the Mac OS 8-bit palette. Use this option to avoid browser dither when viewing images on a monitor display limited to 256 colors.
Creates a custom palette using the Color Table dialog box. Either edit the color table and save it for later use or click Load to load a previously created color table.
So just play with them to get your desired look.
The third dropdown from top on left side is selecting the settings of how to blend the edges to background. There are three method just use them and see how they work.
The fourth important dropdown from the top on right side is matte, here u actually select the color on which u will put the image at the end, for example if you are planning to put the image on the website which has the background of some color then its always create the perfect result if you use that color as matte.
There are other option too which you can explore but these which i told u are used most commonly..
For any further question please do comment here…