An image scaler implemented in python