Rewriting imagelib class to work with older pointer methods