Implements resize image during instance creation. Fixes bug 1016650. Change-Id: I25f9d1030d9d014b1c9a65430bd535388b8f8943