is there a way to increase the color depth of a gif so when i save it as a jpeg it wont get all fubar?

if someone could throw a dab of code out there to maybe copy one picture box to another picture box that was at a higher bit depth it would be appreciated!