Beispiel #1
0
            public AccessibleBitmap GetAccessibleBitmap()
            {
                AccessibleBitmap aBitmap = new AccessibleBitmap(width, height, pixelBytes);

                aBitmap.SetRawPixelBytes(byteArray);
                return(aBitmap);
            }
Beispiel #2
0
        //Decompress byte array into aBitmap with help of width, length and bitdepth
        public static AccessibleBitmap Decompress(byte[] source, int width, int height, int pixelBytes)
        {
            //Create aBitmap from raw data
            AccessibleBitmap aBitmap = new AccessibleBitmap(width, height, pixelBytes);

            aBitmap.SetRawPixelBytes(source);

            //Return the created bitmap
            return(aBitmap);
        }
Beispiel #3
0
            public AccessibleBitmap GetAccessibleBitmap()
            {
                byte[] tmpBytes = new byte[width * height * pixelBytes];
                new BitArray(boolArray).CopyTo(tmpBytes, 0);

                AccessibleBitmap aBitmap = new AccessibleBitmap(width, height, pixelBytes);

                aBitmap.SetRawPixelBytes(tmpBytes);

                return(aBitmap);
            }
Beispiel #4
0
        //Decompress byte array into aBitmap with help of width, length and bitdepth
        public static AccessibleBitmap Decompress(byte[] source, int width, int height, int pixelBytes)
        {
            BitStreamFIFO layerBits = new BitStreamFIFO(source);

            int[] byteArray = VaryingIntArrayCompressor.Decompress(ref layerBits);

            //Create aBitmap from pixel data
            AccessibleBitmap aBitmap = new AccessibleBitmap(width, height, pixelBytes);

            aBitmap.SetRawPixelBytes(Array.ConvertAll(byteArray, Convert.ToByte));

            return(aBitmap);
        }