Refactor: Move image manipulation into an ImageTransformer class