Map<String, Object> toMap() { return { 'width': width, 'height': height, 'format': format.index, 'quality': quality, }; }