Skip to main content
2 of 14
deleted 7 characters in body
rene Mod
  • 92.1k
  • 17
  • 245
  • 516

This is a unity3d test...

enter image description here

To get the zip file back download the image as file and recode it using this code

    static void Main(string[] args)
    {
         BmpToFile(@"c:\your\download\LA3s5.png", @"code.zip");
    }

    private static void BmpToFile(string src, string dst)
    {
        var file = File.OpenWrite(dst);
       
        var bitmap = new Bitmap(src);

        var data = bitmap.LockBits(
            new Rectangle(0, 0, bitmap.Width, bitmap.Height), 
            ImageLockMode.WriteOnly, 
            PixelFormat.Format8bppIndexed);

        var line = new byte[data.Stride];
        for(var lineCount=0; lineCount< data.Height; lineCount++)
        {
            Marshal.Copy(data.Scan0 + lineCount* data.Stride, 
                line, 0, data.Stride);
            file.Write(line,0, line.Length);
        }
        bitmap.UnlockBits(data);
        file.Close();
    }
rene Mod
  • 92.1k
  • 17
  • 245
  • 516