예제 #1
0
        public void setPlaneFormat(int idx, sPlanePixelFormat ppf)
        {
            if (idx < 0 || idx >= MAX_PLANES)
            {
                throw new ArgumentOutOfRangeException();
            }
            int baseIndex = idx * 5;

            plane_fmt[baseIndex]     = ppf.sizeImage;
            plane_fmt[baseIndex + 1] = ppf.bytesPerLine;
        }
예제 #2
0
        public sPlanePixelFormat getPlaneFormat(int idx)
        {
            if (idx < 0 || idx >= numPlanes)
            {
                throw new ArgumentOutOfRangeException();
            }
            int baseIndex         = idx * 5;
            sPlanePixelFormat res = new sPlanePixelFormat();

            res.sizeImage    = plane_fmt[baseIndex];
            res.bytesPerLine = plane_fmt[baseIndex + 1];
            return(res);
        }