示例#1
0
            public void Load(string path)
            {
                RawImage = Corona.Image.Open(new MemoryStream(File.ReadAllBytes(path)), Corona.PixelFormat.DontCare, Corona.FileFormat.Auto);

                //convert the raw image to one of two formats, so we don't go crazy with lots of options
                if (RawImage.PixelFormat == Corona.PixelFormat.I8) { } //no problem, its fine
                else
                {
                    var temp = RawImage.Convert(Corona.PixelFormat.R8G8B8A8);
                    RawImage.Dispose();
                    RawImage = temp;
                }

                Preview = Util.BitmapFromCorImage(RawImage);
            }