Skip to content

Add support of ReadOnlySequence and IBufferWriter #1001

Closed
@DanilovSoft

Description

@DanilovSoft

Description

MagickImage recently began support initialization from ReadOnlySpan<byte>, which is great! But some times source memory can be fragmented and to prevent heap allocation it would be nice to have initialization from ReadOnlySequence<byte>. Also writing output is still restricted to Stream and coresponding to Span's it would be good to have overload for IBufferWriter<byte>.

Proposal

Add constructor overload MagickImage(ReadOnlySequence<byte> data) and coresponding Read overload.
Add Write overload MagickImage.Write(IBufferWriter<byte> buffer).

System Configuration

  • Magick.NET version: Magick.NET-Q16-x64 8.1.0
  • Environment (Operating system, version and so on): Windows 10 x64

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions