Does SS support WPF specifically loading saving from to file #2982
-
Does it support WPF? Or generally |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
So I was able to save, and my layer appears to be drawing, but I do not see that reflected in the output. Do I need to do something like var source = $"Maps\\{Maps.jpg.island_map_4092x}";
var destination = $"Maps\\{nameof(Maps.jpg.island_map_4092x)}_grid.{nameof(Maps.jpg)}";
using var layer = new KeypadGridLinesLayer();
using var image = SKImage.FromEncodedData(source);
using var bitmap = SKBitmap.FromImage(image);
using var canvas = new SKCanvas(bitmap);
LayerIndex layerId = layer.Draw(bitmap, canvas);
using var data = bitmap.Encode(SKEncodedImageFormat.Jpeg, 100);
using var fs = new FileStream(destination, FileMode.CreateNew, FileAccess.Write, FileShare.Read);
data.SaveTo(fs); |
Beta Was this translation helpful? Give feedback.
-
Ah! 💡 in a word or two it does! The |
Beta Was this translation helpful? Give feedback.
Ah! 💡 in a word or two it does! The
1 px
lines are faint, by design with a 75% alpha channel, but they are there.