minimal code for jpg autodraw rendering issues in 1.77.02

works great in 1.76