ConstructMarkerFromStream Method (SymbolFactory)
How to construct a point symbol from a in memory graphic
//Create a stream for the image
//At 3.0 you need https://www.nuget.org/packages/Microsoft.Windows.Compatibility
//System.Drawing
System.Drawing.Image newImage = System.Drawing.Image.FromFile(@"C:\PathToImage\Image.png");
var stream = new System.IO.MemoryStream();
newImage.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
stream.Position = 0;
//Create marker using the stream
CIMMarker markerFromStream = SymbolFactory.Instance.ConstructMarkerFromStream(stream);
//Create the point symbol from the marker
CIMPointSymbol pointSymbolFromStream = SymbolFactory.Instance.ConstructPointSymbol(markerFromStream);
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.