resize image and laytou