Skip to content

ImageFormatException: 'TIFF image contains circular directory offsets' #2923

Closed as not planned
@artemyakovlievlogitytech

Description

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of ImageSharp
  • I have verified if the problem exist in both DEBUG and RELEASE mode
  • I have searched open and closed issues to ensure it has not already been reported

ImageSharp version

3.1.8

Other ImageSharp packages and versions

SixLabors.ImageSharp

Environment (Operating system, version and so on)

Windows/Linux

.NET Framework version

.NET 9

Description

Hi, SixLabors/ImageSharp team.
I've encountered the 'TIFF image contains circular directory offsets' issue with multi-page files.
In the related tickets I've seen that this error is related to files that have corrupted metadata,
b8e8b86#diff-81064e605436da75589b14b7e457c70b71490682ffdc6fd351c919484c7f14e1

Image
But the provided file does not contain circular directory.
I was able to open it in Windows Photo Viewer.
I was also able to process this file using another library MagickNet

var filePath = Path.Combine(Directory.GetCurrentDirectory(), "Files", "test.tiff");

using (var image = await Image.LoadAsync(filePath)) //Exception here 
{
    foreach (var frame in image.Frames)
    {
        //some frame image handling
    }
}

Project https://github.com/artemyakovlievlogitytech/CircularOffsetDependency

Steps to Reproduce

Run CircularOffsetDependency project
https://github.com/artemyakovlievlogitytech/CircularOffsetDependency

Images

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions