/// <summary>Add a sprite by decoding a picture</summary> public int loadImage(Stream source, eImageFileFormat format) { int res = atlas.loadImage(source, format); Utils.NativeErrorMessages.throwForHR(res); needsUpdate = true; return(res); }
static int loadSprite(TextureAtlas atlas, iStorageFolder folder, string name, eImageFileFormat format = eImageFileFormat.PNG) { folder.openRead(name, out var stream); using (stream) return(atlas.loadImage(stream, format)); }