Reformatted and moved new scaling implementation to scrimage package