mara0004/img2pdf:getexif
main
No need for a loop here either. Note that you could also use a dictionary rather than an if-elif tree for the value -> rotation mapping (where valid/supported).