fix compile error due to variable scope

The width and height variables are used outside the Autorelease Pool Block, oups. Indentation within the block scope was also sorted to be consistent with the method.