IronSoftware.System.Drawing icon indicating copy to clipboard operation
IronSoftware.System.Drawing copied to clipboard

Support IEnumerable Casting

Open djrecipe opened this issue 3 years ago • 0 comments

SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgba32> imgSharp = SixLabors.ImageSharp.Image.Load<SixLabors.ImageSharp.PixelFormats.Rgba32>(imagePath);

List<SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgba32>> imgSharpList = new List<Image<Rgba32>>() {imgSharp};

// TODO 1/9/23: support this casting

List<AnyBitmap> anyBitmapList = imgSharpList.Cast<AnyBitmap>().ToList();

// should we also support this?

//List<AnyBitmap> anyBitmapList = imgSharpList;

See this commit for regression test

djrecipe avatar Jan 09 '23 07:01 djrecipe