Fixed a issue with NAN (/0) when there is no image width or height.

There was a issue when you didn't get a image back from Instruments it would cause the Log Tree to be unusable, it would crash due to the frame x value being NAN. So i added some logic to stop devision by zero.

Moved some of the logic around to prevent duplicate logic e.g (self.bounds.size.width / self.image.size.width)