Пример #1
0
        public StardewBitmap(Texture2D texture)
        {
            SourceImage = SKBitmap.Decode(StardewThreadSafeLoader.GetTextureMS("something", texture));

            //    SourceImage = SKBitmap.Decode(ms);
            //}
        }
Пример #2
0
        public void FillArray(ref NetArray <int, NetInt> oArray)
        {
            oArray.Clear();
            MemoryStream ms = StardewThreadSafeLoader.GetTextureMS("FillArray", Texture());

            //Texture().SaveAsPng(ms, SourceImage.Width, SourceImage.Height);
            foreach (byte bBtyte in ms.ToArray())
            {
                oArray.Add(bBtyte);
            }
        }
Пример #3
0
 public static StardewBitmap LoadFromContent(string sContentPath)
 {
     return(StardewThreadSafeLoader.LoadImageInUIThread(sContentPath));
 }