Rewrite the PrepareImageData methods to check extents, not dims.

The new rendering code using the extent coordinates to control where
drawing occurs. Simply checking the dimensions of the image is not
sufficient.

Change-Id: Ib8185affafdc345b760f6c2164584f8379982a13
Replace the power-of-two scaling with a clearer implementation.

This implementation is easier to read and performed using only integer
operations.

Change-Id: I97ea7e73e6bbaba14b7dc29d26e1db55e57136e4
Reverted some recent changes to detect isnan()

For some reason, checking in math.h ends up causing
compile failures on some Macs.

Change-Id: I454c91bd49f26018c862717edd00391a03f28996
Merge topic 'freetype-resize-image' into master

40fe9ec0 Replace the power-of-two scaling with a clearer implementation.
41e61435 Rewrite the PrepareImageData methods to check extents, not dims.
Merge topic 'isnan-compile-fix' into master

8e9c51d7 Reverted some recent changes to detect isnan()
COMP: Fix compare sign warning in Ensight6BinaryReader.

Change-Id: I22d0d489188d72cf1abc0252b4082fd60679e257
Merge topic 'ensight-sign-warn' into master

41d142e5 COMP: Fix compare sign warning in Ensight6BinaryReader.