configurable image encoding format and scaling