Patch from yurly@unet.net to fix image corruption in rotate180 when image height is odd