Exemplo n.º 1
0
        public static IBitmap CreateInitVerifyBitmap(int width, int height, int border)
        {
            IBitmap bmp = CreateVerifyBitmap();

            bmp.Init(height, width, border);
            Assert.Equal(width, bmp.Width);
            Assert.Equal(height, bmp.Height);
            Assert.Equal(border, bmp.Border);
            return(bmp);
        }
Exemplo n.º 2
0
        protected override void CodeAbsoluteMarkSize(IBitmap bm, int border)
        {
            int xsize = CodeNum(0, Bigpositive, _AbsSizeX);
            int ysize = CodeNum(0, Bigpositive, _AbsSizeY);

            if ((xsize != (0xffff & xsize)) || (ysize != (0xffff & ysize)))
            {
                throw new DjvuFormatException("Image bad number");
            }

            bm.Init(ysize, xsize, border);
        }
Exemplo n.º 3
0
        protected override void CodeRelativeMarkSize(IBitmap bm, int cw, int ch, int border)
        {
            int xdiff = CodeNum(Bignegative, Bigpositive, _RelSizeX);
            int ydiff = CodeNum(Bignegative, Bigpositive, _RelSizeY);
            int xsize = cw + xdiff;
            int ysize = ch + ydiff;

            if ((xsize != (0xffff & xsize)) || (ysize != (0xffff & ysize)))
            {
                throw new DjvuFormatException("Image decoder value");
            }

            bm.Init(ysize, xsize, border);
        }