various picture modification code for harvard's cs50x pset4