improve image output formatting