Introducing the Formula for scale2x

Simple Formula and test. Had to modify a File to cope with libpng. Included changes suggested by adamv.