         return SVGContext.ImageTableKey(self)
     }
     
-    fileprivate func encode(using storageType: ImageRep.MediaType, properties: [ImageRep.PropertyKey : Any]) -> String? {
+    fileprivate func encode(using storageType: MediaType, properties: [ImageRep.PropertyKey : Any]) -> String? {
         guard let mediaType = storageType.media_type_string else { return nil }
         guard let data = self.representation(using: storageType, properties: properties) else { return nil }
         return "data:\(mediaType);base64," + data.base64EncodedString()

    
    var imageTableKey: SVGContext.ImageTableKey { get }
    
    func encode(using storageType: ImageRep.MediaType, properties: [ImageRep.PropertyKey : Any]) -> String?
}

extension ImageRep.MediaType {
    
    fileprivate var media_type_string: String? {
        switch self {

        self.append(element, _bound, transform)
    }
    
    public func draw<Image : ImageProtocol>(image: Image, transform: SDTransform, using storageType: MediaType, properties: [ImageRep.PropertyKey : Any]) {
        let image = image as? SVGImageProtocol ?? image.convert(to: .sRGB, intent: renderingIntent) as Doggie.Image<ARGB32ColorPixel>
        self._draw(image: image, transform: transform, using: storageType, properties: properties)
    }
