AutoStereogramDemo.AutoStereogramBuilder.GenerateBitmap C# (CSharp) Метод

GenerateBitmap() публичный Метод

public GenerateBitmap ( Bitmap backgroundImage ) : Bitmap
backgroundImage System.Drawing.Bitmap
Результат System.Drawing.Bitmap
        public Bitmap GenerateBitmap(Bitmap backgroundImage)
        {
            return GenerateBitmap((bitmap, y, uniqueColorsCount, colors) => SampleImageColorGenerator(bitmap, backgroundImage, y, uniqueColorsCount, colors));
        }

Same methods

AutoStereogramBuilder::GenerateBitmap ( ColorGenerator colorGenerator = null ) : Bitmap

Usage Example

Пример #1
0
        private static void CreateWavesWithImage()
        {
            var asb = new AutoStereogramBuilder(1024, 768, 3);

            asb.AddSphere(-0.2, -0.2, 1.6, 0.025);
            asb.AddSphere(-0.2, -0.2, 1.4, 0.025);
            asb.AddSurface(WavesSurfaceFunc, 2.3, 1.7);

            Bitmap bitmap = (Bitmap)Image.FromFile(GetPathAtAssemblyLocation("input\\hi.png"));

            asb.AddModelByDepthMap(bitmap, new Point3D {
                X = 0.1, Y = -0.3, Z = 1.8
            }, new Vector3D {
                X = 1, Y = 0.5, Z = -1
            },
                                   new Vector3D {
                X = -0.5, Y = 1, Z = -1
            }, new Vector3D {
                X = 1, Y = 1, Z = 1
            }, 0.8, 0.8, 0.05);

            Bitmap backgroundImage = (Bitmap)Image.FromFile(GetPathAtAssemblyLocation("input\\background.jpg"));

            asb.GenerateBitmap(backgroundImage).Save(GetPathAtAssemblyLocation("output\\hello.jpg"), ImageFormat.Jpeg);
        }
All Usage Examples Of AutoStereogramDemo.AutoStereogramBuilder::GenerateBitmap