After discussion at Roxen IS: adding Pike-level wrappers to the
Image.JPEG.decode() and Image.JPEG._decode() functions in order to
flips/rotates the decoded image based on EXIF Orientation information,
if such information is present. Also added an Image.JPEG.raw_decode()
to decode an image without rotating/flipping, which works much like
Image.JPEG._decode() did before overloading the EXIF handling.
Since the default processing of JPEG in Image.JPEG was changed to
take EXIF Orientation into account, let's update Image.Dims to also
take that into account, so it correctly predicts the dimensions that
will result from loading the image.