Adjusting raster size calculation and adding some logging.

@constantinius, this should hopefully resolve our rendering issues.