Esempio n. 1
0
        public double TotalPixels(JPEG jpeg)
        {
            jpeg.Bytes(); //gets the bytes into memory
            BitmapWrapper wrapper = new BitmapWrapper(jpeg.ReturnBitmap());

            return(wrapper.bitmap.Height * wrapper.bitmap.Width);
        }
Esempio n. 2
0
        /// <summary>
        /// Returns the millseconds to turn a in memory JPEG into a Bitmap
        /// </summary>
        /// <returns></returns>
        public double MsToBitmap(JPEG jpeg)
        {
            jpeg.Bytes(); //gets the bytes into memory
            Stopwatch sw = new Stopwatch();

            sw.Start();
            BitmapWrapper wrapper = new BitmapWrapper(jpeg.ReturnBitmap());

            sw.Stop();
            return(sw.Elapsed.TotalMilliseconds);
        }