Revert "Remove GIF save, fix JPG background saving"

This reverts commit d28ff049486c563facec4135822ee7ccd55be122.