public bool IsPage(IGraph <IVisual, IVisualEdge> source, IVisual page) { var digidoc = new DigidocSchema(source.ThingGraph(), source.ThingOf(page)); var pageThing = source.ThingOf(page) as IStreamThing; var info = new ImageContentSpot(); return(pageThing != null && info.Supports(pageThing.StreamType)); }
protected virtual Content <Stream> Digg(Content <Stream> source, Content <Stream> sink) { if (!_spot.Supports(source.ContentType)) { return(sink); } if (source.ContentType == ContentTypes.DIB) { var bmp = new BitmapFromDibStream(source.Data); var sinkStream = bmp.Clone(bmp.Length); sink.Data = sinkStream; sink.ContentType = ContentTypes.BMP; } return(sink); }