using System; using System.Drawing; using bbiwarg.DataSource; namespace Test.bbiwarg { class TestDataSource { static void Main(string[] args) { IVideoDataSource source = new IIsuDataSource("..\\..\\videos\\2.skv"); source.init(); source.start(); int i = 0; int j = 0; while (source.isActive()) { source.updateFrame(); if ((i % 30) == 0) { ColorImage image = source.getColorImage(); /*Bitmap bm = new Bitmap(image.getWidth(), image.getHeight()); for (int x = 0; x < image.getWidth(); ++x) { for (int y = 0; y < image.getHeight(); ++y) { int value = (int) (image.getDepth(x, y) / 1000.0 * 255.0) % 256; bm.SetPixel(x, y, Color.FromArgb(255, value, value, value)); } } bm.Save("test." + j + ".png"); j++;*/ } source.releaseFrame(); ++i; } source.stop(); } } }