question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cant convert to JPEG XL

See original GitHub issue

Description

Simple project file converting a JPEG to JPEG XL fails without exceptions.

Steps to Reproduce

Simple .NET6 console app with following code and attached image(s) fails and exits with Test.exe (process 2924) exited with code -1073741819 without any exception being thrown or caught:

using ImageMagick;

try
{
  var file = @"dakar-rally.jpg";
  var fileSave = @"dakar-rally.jxl";

  MagickNET.Initialize();

  using var image = new MagickImage( file );
  image.Write( fileSave, MagickFormat.Jxl );
}
catch( MagickException ex )
{
  Console.WriteLine( ex.ToString() );
}
catch( Exception ex )
{
  Console.WriteLine( ex.ToString() );
}

Tested with images: us.zip dakar-rally.zip

System Configuration

  • Magick.NET version: 9.1.2
  • Environment (Operating system, version and so on): Windows 11
  • Additional information: Using Magick.Net.Core and Magick.Net-Q16-AnyCpu

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
danpetittcommented, Feb 15, 2022

Thanks a lot for taking the time looking into this very tricky issue Dirk

1reaction
dlemstracommented, Feb 15, 2022

Thanks for reporting this. I could not reproduce your issue with a local debug build but testing with the release build inside the NuGet package resulted in the same error that you are getting. This seems to be happening due to the switch of the build from VisualStudio 2019 to 2022. Some kind of release optimization of Visualstudio 2022 breaks the code and will always result in an exception.

I disable the optimization of jpeg-xl inside @ImageMagick and this seems to fix the build. Going to need to run some tests to verify that the new build works now and then publish a new release later this week to resolve this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Made a simple JPEG XL converter web app, supports ...
Converting to jpeg uses ffmpeg with its default options, so the quality settings are different. The produced Jpeg XL images are with lossless ......
Read more >
Can't convert from avif and jpeg-xl to png, jpg, webp and etc.
I'm using "AVIFlib.dll" and "libJPEGXL.dll" from XnView MP 1.01 and it allow me to convert with NConvert from png, jpg, web and etc....
Read more >
Convert to JPEG XL (JXL) Online • Compress Images
Large files up to 2 GB supported. Quick and easy to use. No download or registration needed for using the JPEG XL (JXL)...
Read more >
Lossless conversion from JPG to JXL - DataHoards
Today I'm using libjxl to convert my photography collection from JPEG to JPEG XL. All without losing any quality yet reducing storage space....
Read more >
Chrome still hasn't changed its opinion about dropping ...
Google used to support JPEG XL in chromium, but dropped support for it. Many people believe this is specifically to manipulate a market ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found