to separate ImageGeneretor class from applet.