Hey,
it happens randomly and with any kind of image. The problem is that I couldn't reproduce it locally just in the server where this Azure function runs. The message is the following:
The image is unrecognized. (0x88982F60)PhotoSauce.MagicScaler.WicPlanarCache.loadBuffer
I get an image byte array which I convert to stream and use in the BuildPipeline method.
if (query.FileFormat == RequestFileFormat.Webp)
{
CodecManager.Configure(codecs => { codecs.UseLibwebp(); });
settings.TrySetEncoderFormat(ImageMimeTypes.Webp);
}
using var outputStream = new MemoryStream();
await Task.Run(() =>
{
Stream stream = new MemoryStream(bytes);
using var pipeline = MagicImageProcessor.BuildPipeline(stream, settings);
if (query.Blur.HasValue)
{
pipeline.AddTransform(new GaussianBlurTransform(radius: query.Blur.Value));
}
pipeline.WriteOutput(outputStream);
pipeline.Dispose();
});
var imageBytes = outputStream.ToArray();
await outputStream.DisposeAsync();
Do you have any idea what can be the problem?
Thanks in advance for your help!
Hey, it happens randomly and with any kind of image. The problem is that I couldn't reproduce it locally just in the server where this Azure function runs. The message is the following:
The image is unrecognized. (0x88982F60)
PhotoSauce.MagicScaler.WicPlanarCache.loadBuffer
I get an image byte array which I convert to stream and use in the BuildPipeline method.
Do you have any idea what can be the problem? Thanks in advance for your help!