Use explicit casting to retrieve DOM attributes width,height as numbers