use rgb::RGB8; pub enum ImageSource { External { /// The reference to the tileset image file (Tiled supports most common image formats). Only used if the image is not embedded. source: String, }, /// Embedded images with a data child element /// /// Note that it is not currently possible to use Tiled to create maps with embedded image data, even though the TMX format supports this Embedded { /// . Valid values are file extensions like png, gif, jpg, bmp, etc. format: String, data: super::data::EncodedData, }, } pub struct Image { pub source: ImageSource, /// Defines a specific color that is treated as transparent (example value: “#FF00FF” for magenta). /// Including the “#” is optional and Tiled leaves it out for compatibility reasons. (optional) pub transparent_color: Option, /// The image width in pixels (optional, used for tile index correction when the image changes) pub width: Option, /// The image height in pixels (optional) pub height: Option, }