Add jpg support for state chart image saving