Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Fits image format MagickImageCollection constructor error

未关闭
#2,100 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
58/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
csharp
领域
backend

调研方向

Start by comparing how MagickImage and MagickImageCollection read FITS data, focusing on the collection stream and file read paths named in the stack traces. Reproduce with the attached sample FITS image and check the collection constructor tests for existing format coverage. Done means the collection constructors load the FITS image successfully without throwing, while existing collection reads still pass.

由索引模型根据 Issue 内容生成。

描述

Magick.NET version

15.0.0

Environment (Operating system, version and so on)

Linux x64, Windows 11 x64

Description

Images in the .fts (Fits) image format cannot be constructed using any of the MagickImageCollection constructor overloads, see exceptions below.

When using any of the MagickImage constructor overloads, the Fits images are correctly instantiated.

  • From constructor MagickImageCollection(Stream stream, MagickFormat format):
ImageMagick.MagickCorruptImageErrorException: UnexpectedEndOfFile '': No such file or directory @ error/fits.c/ReadFITSImage/427
   at ImageMagick.MagickImageCollection.NativeMagickImageCollection.ReadStream(IMagickSettings`1 settings, ReadWriteStreamDelegate reader, SeekStreamDelegate seeker, TellStreamDelegate teller, Void* data) in /_/src/Magick.NET/Generated/Magick.NET.SourceGenerator/ImageMagick.SourceGenerator.NativeInteropGenerator/MagickImageCollection.g.cs:line 673
   at ImageMagick.MagickImageCollection.NativeMagickImageCollection.ReadStream(IMagickSettings`1 settings, ReadWriteStreamDelegate reader, SeekStreamDelegate seeker, TellStreamDelegate teller) in /_/src/Magick.NET/MagickImageCollection.cs:line 2185
   at ImageMagick.MagickImageCollection.AddImages(Stream stream, IMagickReadSettings`1 readSettings, Boolean ping) in /_/src/Magick.NET/MagickImageCollection.cs:line 2056
   at ImageMagick.MagickImageCollection.Read(Stream stream, IMagickReadSettings`1 readSettings) in /_/src/Magick.NET/MagickImageCollection.cs:line 1166
   at ImageMagick.MagickImageCollection.Read(Stream stream, MagickFormat format) in /_/src/Magick.NET/MagickImageCollection.cs:line 1155
   at ImageMagick.MagickImageCollection..ctor(Stream stream, MagickFormat format) in /_/src/Magick.NET/MagickImageCollection.cs:line 163
  • From constructor MagickImageCollection(string fileName):
ImageMagick.MagickCorruptImageErrorException: UnexpectedEndOfFile 'sample_1920×1280.fts': No such file or directory @ error/fits.c/ReadFITSImage/427
   at ImageMagick.MagickImageCollection.NativeMagickImageCollection.ReadFile(IMagickSettings`1 settings) in /_/src/Magick.NET/Generated/Magick.NET.SourceGenerator/ImageMagick.SourceGenerator.NativeInteropGenerator/MagickImageCollection.g.cs:line 657
   at ImageMagick.MagickImageCollection.AddImages(String fileName, IMagickReadSettings`1 readSettings, Boolean ping) in /_/src/Magick.NET/MagickImageCollection.cs:line 2100
   at ImageMagick.MagickImageCollection.Read(String fileName, IMagickReadSettings`1 readSettings) in /_/src/Magick.NET/MagickImageCollection.cs:line 1195
   at ImageMagick.MagickImageCollection.Read(String fileName) in /_/src/Magick.NET/MagickImageCollection.cs:line 1175
   at ImageMagick.MagickImageCollection..ctor(String fileName) in /_/src/Magick.NET/MagickImageCollection.cs:line 182
Steps to Reproduce

Actual behavior: Attempting to construct a MagickImageCollection instance using an image in the .fts (Fits) format throws an exception.

Expected behavior: Attempting to construct a MagickImageCollection instance using an image in the .fts (Fits) format works correctly, as it does when constructing a MagickImage instance, and does not throw an exception.

Images

sample_1920×1280.zip

主要语言
C#
星标
4k
派生
454
平均合并
12 小时 54 分钟
30 天内合并 PR
3

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dlemstra/Magick.NET 的其他 Issue

查看 dlemstra/Magick.NET 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。