Fixed the problem in which images are transposed in GUI than in output files