ImageSharp icon indicating copy to clipboard operation
ImageSharp copied to clipboard

v3.1.x Fix 2758

Open JimBobSquarePants opened this issue 1 year ago • 2 comments

Prerequisites

  • [x] I have written a descriptive pull-request title
  • [x] I have verified that there are no overlapping pull-requests open
  • [x] I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules :cop:.
  • [x] I have provided test coverage for my change (where applicable)

Description

Fixes #2758

I cannot include the images in the tests as I was unable to open a FileExplorer instance containing them without crashing in my Windows 11 instance.

Still not sure what's going on with the provided repo, but I have added the relevant test images and tests.

JimBobSquarePants avatar Jun 27 '24 06:06 JimBobSquarePants

Looks like it's breaking other gif use-cases?

I plan to also take a look in the weekend and the add test images. For me File Explorer works on Win11 for the folder.

antonfirsov avatar Jun 27 '24 12:06 antonfirsov

Looks like it's breaking other gif use-cases?

I plan to also take a look in the weekend and the add test images. For me File Explorer works on Win11 for the folder.

@antonfirsov My first attempt was bad as I misunderstood the problem.

I've now refactored the LZW decoder to run row-by-row, so we only allocate enough bytes for a single row rather than the full buffer. In this case this brings down the allocation from 4GB to 64K. This should mean a massive win across the board.

JimBobSquarePants avatar Jun 27 '24 14:06 JimBobSquarePants