public override Document ConvertDocument(DocumentInfo targetDocumentInfo, Pablo.Handler handler) { if (handler != null && targetDocumentInfo.ID == Info.ID && Math.Abs(handler.Zoom - 1f) > 0.001f) { var doc = (ImageDocument)targetDocumentInfo.Create(); doc.Image = new Bitmap(Image, handler.DrawSize.Width, handler.DrawSize.Height, ImageInterpolation.High); return(doc); } return(base.ConvertDocument(targetDocumentInfo, handler)); }
public void Load(Stream fs, Document document, Pablo.Handler handler) { ImageDocument doc = (ImageDocument)document; doc.Image = new Bitmap(fs); }
protected override void SaveStream(Stream stream, Format format, Pablo.Handler handler) { var formatImage = (FormatImage)format; formatImage.Save(stream, this); }
protected override void LoadStream(Stream stream, Format format, Pablo.Handler handler) { var formatImage = (FormatImage)format; formatImage.Load(stream, this, handler); }