c++ Programming Glossary: fi.length
How can I convert a binary file to another binary representation, like an image http://stackoverflow.com/questions/3408864/how-can-i-convert-a-binary-file-to-another-binary-representation-like-an-image var fi new FileInfo exefile var dimension int Math.Sqrt fi.Length 1d 4 using var bitmap new Bitmap dimension dimension 2 store.. in the first pixel. bitmap.SetPixel 0 0 Color.FromArgb int fi.Length var buffer new byte fi.Length 4 fi.Length 4 Array.Copy File.ReadAllBytes.. 0 0 Color.FromArgb int fi.Length var buffer new byte fi.Length 4 fi.Length 4 Array.Copy File.ReadAllBytes exefile buffer fi.Length..
|