Doing image centering in a simpler way and compressing any large images