Python + qt4 application to resize images