Create hard-edged transparency in a GIF or PNG‑8 file
Use
hard-edged transparency when you don’t know the background color
of a web page, or when the web page background contains a texture
or pattern. However, keep in mind that hard-edged transparency can
cause jagged edges in the image.
Open or create an image that contains transparency, and
choose File > Save For Web.
In the Save For Web dialog box, select GIF or PNG‑8 as
the optimization format.