saucecontrol / PhotoSauce

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

Running MagicScaler in an Azure App Service #76

Closed endintiers closed 3 years ago

endintiers commented 3 years ago

Hi,

MagicScaler works for 'standard' JPEG and PNG files, but when I try to process a TIFF with B&W CCITT Group 4 images in it:

I can't figure out how to install WIC in an Azure App Service (which I assume is the problem) - do you know??

Thanks, Chris :-)

saucecontrol commented 3 years ago

Interesting... can't say I've ever tried that. It's possible they exclude some of the WIC codecs on whatever stripped-down/hardened custom Windows builds they run Azure App Services on. You wouldn't be able to add it if so, because WIC is a component of Windows itself.

I'm actively working on proper support for plugging codecs into the MagicScaler pipeline, so it'll be possible to use e.g. libtiff in the future, but I'm focusing on the encoder side first. The plan is to have both sides working for the next MagicScaler release later this year.

In the meantime, you might be able to put something together using the TIFF support recently added to ImageSharp and available in their latest alpha builds. If you only need to decode TIFF and will be encoding to PNG, you can even integrate ImageSharp with MagicScaler today using something like the sample here: https://github.com/saucecontrol/PhotoSauce/tree/master/src/ManagedCodecs. Although the memory efficiency won't match what you get with the WIC codec, it would be portable.