Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support IEnumerable Casting #31

Open
djrecipe opened this issue Jan 9, 2023 · 0 comments
Open

Support IEnumerable Casting #31

djrecipe opened this issue Jan 9, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@djrecipe
Copy link
Member

djrecipe commented Jan 9, 2023

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

@michael-ironsoftware michael-ironsoftware added the enhancement New feature or request label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants