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

public WriteToPng ( string filename ) : void
filename string
Результат void
Пример #1
0
    protected void OnRemoteFXActionActivated(object sender, System.EventArgs e)
    {
        int index;
        BinaryReader fp;
        string filename;
        RemoteFX remotefx;
        SurfaceCommand cmd;
        Cairo.ImageSurface surface;

        filename = "data/rfx/rfx.bin";
        fp = new BinaryReader(File.Open(filename, FileMode.Open));

        cmd = SurfaceCommand.Parse(fp);
        cmd.Process();

        index = 0;
        remotefx = SurfaceCommand.remotefx;

        while (remotefx.HasNextTile())
        {
            surface = remotefx.GetNextTile();
            Console.WriteLine(String.Format("data/rfx/tile_{0:000}.png", index));
            surface.WriteToPng(String.Format("data/rfx/tile_{0:000}.png", index++));
        }

        fp.Close();
    }