added image rotation case.
adjust size viewport
added json parse