Exemplo n.º 1
0
        public MemoryStream toImageMemoryStream()
        {
            Image        img = SkeletonPainter.paintonblank(skeleton);
            MemoryStream m   = new MemoryStream();

            img.Save(m, System.Drawing.Imaging.ImageFormat.Jpeg);
            return(m);
        }
Exemplo n.º 2
0
        public MyOverlayFrame(MySkeletonFrame skeletonframe, MyColorFrame colorframe)
        {
            this.timetag = colorframe.getTime();
            System.Drawing.Bitmap colorimg = (System.Drawing.Bitmap)System.Drawing.Image.FromStream(colorframe.getImageMemoryStream());
            System.Drawing.Image  painted  = SkeletonPainter.paintSkeletonAndHideHead(colorimg, skeletonframe.getSkeletons());
            overlayMemoryStream = new MemoryStream();
            painted.Save(overlayMemoryStream, System.Drawing.Imaging.ImageFormat.Jpeg);

            System.Drawing.Bitmap colorimg2 = (System.Drawing.Bitmap)System.Drawing.Image.FromStream(colorframe.getImageMemoryStream());
            System.Drawing.Image  painted2  = SkeletonPainter.hideHead(colorimg2, skeletonframe.getSkeletons());
            headhidedMemoryStream = new MemoryStream();
            painted2.Save(headhidedMemoryStream, System.Drawing.Imaging.ImageFormat.Jpeg);
        }