saucecontrol / PhotoSauce

MagicScaler high-performance, high-quality image processing pipeline for .NET
http://photosauce.net/
MIT License
569 stars 49 forks source link

MagicScalar Linux issue #137

Closed BritBlaster closed 8 months ago

BritBlaster commented 8 months ago

I'm trying to resize an image stream, using

                var processImageSettings = new ProcessImageSettings()
                {
                    Width = width,
                    Height = height,
                    ResizeMode = CropScaleMode.Crop,
                    HybridMode = HybridScaleMode.Turbo
                };

                MagicImageProcessor.ProcessImage(stream, outstream, processImageSettings);

This works well in windows, but I'm trying to run my app in an Azure web container running Linux. I've downloaded the codecs, and registered them with:

    CodecManager.Configure(codecs => {
        codecs.UseLibwebp();
        codecs.UseLibjpeg();
        codecs.UseLibpng();
        codecs.UseGiflib();
        codecs.UseLibheif();
        codecs.UseLibjxl();
    });

But this causes an exception: Image format not supported. Please ensure the input file is an image and that a codec capable of reading the image is registered.

I'm not sure what the limitations are of the codecs. The files I've tried are all pretty typical jpg files. I'm sure this must be user-error, but not sure what I've done wrong here...

I have verified that the libraries are all present

-rwxr--r-- 1 root root  555520 Oct 11 21:16  PhotoSauce.MagicScaler.dll
-rwxr--r-- 1 root root   32256 Oct 11 21:17  PhotoSauce.NativeCodecs.Giflib.dll
-rwxr--r-- 1 root root   49152 Oct 11 21:17  PhotoSauce.NativeCodecs.Libheif.dll
-rwxr--r-- 1 root root   44032 Oct 11 21:17  PhotoSauce.NativeCodecs.Libjpeg.dll
-rwxr--r-- 1 root root   42496 Oct 11 21:17  PhotoSauce.NativeCodecs.Libjxl.dll
-rwxr--r-- 1 root root   33280 Oct 11 21:17  PhotoSauce.NativeCodecs.Libpng.dll
-rwxr--r-- 1 root root   53760 Oct 11 21:17  PhotoSauce.NativeCodecs.Libwebp.dll

Thanks for any pointers...