In Photoshop, easy way is to go to Files/Save to Web and select the colors and (in jpeg) the compression. You also can do mattes etc, and change the colors before you save.
If you want to change the settings in photoshop itself, it's not great, I use Image Ready for that, a lot easier because...