encode background img