Skip to content

Support IEnumerable Casting #31

@djrecipe

Description

@djrecipe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions