d2phap / d2phap/ImageGlass

Malformed webp fails to display, displays in browsers and other MS Paint without issue

Open
#2,419 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🐞 bug ℹ more info required
Dominant language
C#
Stars
14.4k
Forks
752
Avg merge
10d 14h
Merged PRs (30d)
1

Description

Windows OS version

25H2 26200.9168

ImageGlass version

10.0.11

ImageGlass release

Store

1️⃣ Steps to reproduce

Open the sample .webp image file with ImageGlass 10.0.11 on Windows 11

Edge, Firefox, Microsoft Paint all successfully open this image with displaying any errors.

2️⃣ Actual behavior

ImageGlass instead delivers this error:

<unknown> ImageMagick. MagickCorruptImageErrorException > corrupt image

at ImageMagick. NativeInstance.CheckException(IntPtr, IntPtr) + 0x62

Could not load this image

ImageGlass 10 10.0.4.819-win-x64
Magick.NET Q16-HDRI-OpenMP x64 net8.0 14.16.0
Windows 64-bit 10.0.26200.0, .NET 10.0.11

'' @ error/webp.c/ReadWEBPImage/569

at ImageMagick.MagickImage.NativeMagickImage. ReadStream(IMagickSettings'1, MagickImage.ReadWriteStreamDelegate, MagickImage. SeekStreamDelegate, MagickImage. TellStreamDelegate, Void*) + 0x88
at ImageMagick.MagickImage. Oc_DisplayClass770_0 .< ReadAsync>b_0() + 0x99
at ImageMagick.AsyncStreamWrapper. c_DisplayClass11_0 .< ReadAsync>b_@() + 0x19
at System. Threading.ExecutionContext.RunInternal(ExecutionContext, ContextCallback, Object) + 0xad
End of stack trace from previous location ---
at System. Threading.ExecutionContext.RunInternal(ExecutionContext, ContextCallback, Object) + 0x10b
at System. Threading. Tasks. Task. ExecuteWithThreadLocal(Task&, Thread) + 0x90
-- End of stack trace from previous location ---
at ImageMagick.AsyncStreamWrapper .< ReadAsync>d_11.MoveNext() + 0x68
- End of stack trace from previous location ---
at ImageMagick.MagickImage .< ReadAsync>d_770.MoveNext() + 0x159
- End of stack trace from previous location ---
at ImageMagick. MagickImage .< ReadAsync>d_534.MoveNext() + 0xf0
- End of stack trace from previous location -
at ImageGlass. Common.Photoing.MagickCodec .< DecodeImageAsync>d_9.MoveNext() + 0xbe
- End of stack trace from previous location ---
at ImageGlass.Common. Photoing.MagickCodecAdapter .< DecodeAsync>d_26.MoveNext() + 0x7a
-- End of stack trace from previous location ---
at ImageGlass. Common.Photoing.Photo .< OnDecodingAsync>d_90.MoveNext() + 0x91
-- End of stack trace from previous location ---
at ImageGlass.Common.Photoing.Photo. c_DisplayClass99_0 .<< LoadAsync>b_0>d.MoveNext() + 0x51
3️⃣ Expected behavior

Image should display without errors

4️⃣ Screenshots / Video / Sample image file
Image
5️⃣ Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at ImageGlass.Common.Photoing.MagickCodec.DecodeImageAsync and MagickCodecAdapter.DecodeAsync, using the attached WebP sample to reproduce the failure. Compare the reported ImageMagick error and version details with the successful behavior in Edge, Firefox, and Paint; done means ImageGlass displays this sample without an error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.