decode bitmap in main thread