Skip to content

MagickImageCollection.ReadAsync appends frames to the collection #2077

Description

@d2phap

Magick.NET version

14.16

Environment (Operating system, version and so on)

Windows 11

Description

Calling MagickImageCollection.ReadAsync appends to the collection instead of replacing it.

Steps to Reproduce

var filePath = @$"C:\my\photo.tif"; // 2 pages
var imgColl = new MagickImageCollection();

imgColl.Ping(filePath);            // => ✅ imgColl.Count = 2
imgColl.Read(filePath);            // => ✅ imgColl.Count = 2
await imgColl.ReadAsync(filePath); // => ❌ imgColl.Count = 4 

image.png

image.png

Images

Note: This sample TIF contains 7 pages
Multipage TIFF Sample_.tif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions