Image scaling and resizing in separate object