remove unecessary functions (taken from ibltoolkit)
use the image size to set the render size