Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading JPEG2000 images takes too long #1748

Closed
Charltsing opened this issue Nov 9, 2024 · 1 comment
Closed

Reading JPEG2000 images takes too long #1748

Charltsing opened this issue Nov 9, 2024 · 1 comment
Milestone

Comments

@Charltsing
Copy link

Charltsing commented Nov 9, 2024

Magick.NET version

13.10.0

Environment (Operating system, version and so on)

Windows10, net framework 4.7.2

Description

I tried to read a Jpeg2000 image with a width of 6622 and a height of 4689, which took 6 seconds. Is this normal time?
How to optimize the time spent reading JPEG2000

222

JPXDecode.zip

settings.SetDefines(new Jp2ReadDefines
{
QualityLayers = 100,
});

@dlemstra
Copy link
Owner

dlemstra commented Nov 9, 2024

This is slow because of two reasons. I takes quite some time to decode the jp2 image and then also some time to copy this decoded data to our image data. And because of how this information is stored it makes it more difficult/expensive to copy the pixel data.

The copy action could be improved so I just pushed a patch to make the part that copies the pixels twice as fast. The other part is out of our control. This change will not become available in the next release because I was already preparing this and don't want to include this change at the last minute. So it might take a while before you will get this performance improvement.

@dlemstra dlemstra added this to the 14.1.1 milestone Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants