예제 #1
0
        System.IO.Stream IGetImageTask.GetImage(Guid imageID)
        {
            IItemStorage storage = ItemStorageFactory.Create();

            if (storage.Exists(imageID))
            {
                return(storage.Load(imageID));
            }
            return(null);
        }
예제 #2
0
파일: ImageHelper.cs 프로젝트: radtek/eSoda
        public ImageHelper(Guid id)
        {
            this._nazwaPlikuOryginalu = id.ToString() + "p";
            IItemStorage storage = ItemStorageFactory.Create();

            if (!storage.Exists(id))
            {
                throw new ArgumentException("Nie ma takiego skanu");
            }
            _obrazekRoboczy      = System.Drawing.Image.FromStream(storage.Load(id), false, false);
            this._liczbaStron    = _obrazekRoboczy.GetFrameCount(System.Drawing.Imaging.FrameDimension.Page);
            this._aktualnaStrona = 0;
            this._szerokosc      = _obrazekRoboczy.Width;
            this._wysokosc       = _obrazekRoboczy.Height;
            this._skala          = poczatkowaSzerokosc * 100 / this._szerokosc;
            this.generujAktualnyObrazek();
        }