Adam's changes for *optional* pre-computation of images/textures.
Code clean-up in preparation for dynamic calculation of image/texture size.
Added dynamic calculation of image/texture size.