Base number of pixels on the width and the height

Have to multiply by 3u instead of 3, because of compiler bugs.