Jump to content

4.8.0.27 - Change for ImageProcessor.ImageEncoders


Luke

Recommended Posts

For those doing image processing, ImageProcessor.ImageEncoder has now been changed to ImageEncoders (plural), because with the introduction of libvips, there can be multiple encoders available.

Currently at startup I believe you make decisions when choosing skia or imagemagick, you should update that code to look like the following:

            var serverImageEncoders = ImageProcessor.ImageEncoders;
            if (serverImageEncoders.Any(i => i.Name.IndexOf("skia", StringComparison.OrdinalIgnoreCase) != -1))
            {
                // init skia support here
            }
            else if (serverImageEncoders.Any(i => i.Name.IndexOf("magick", StringComparison.OrdinalIgnoreCase) != -1))
            {
                // init image magick support here
            }

@roaku @chef @pünktchen

  • Thanks 3
Link to comment
Share on other sites

chef

@Luke is this only in the beta?

When I load .27-beta, "ImageEncoders" does exist in ImageProcessor. It is still the singular "ImageEncoder"

 

Edited by chef
Link to comment
Share on other sites

11 minutes ago, chef said:

@Luke is this only in the beta?

When I load .27-beta, "ImageEncoders" does exist in ImageProcessor. It is still the singular "ImageEncoder"

 

Yes you need the updated nuget package.

Link to comment
Share on other sites

chef

@Luke

Right sorry about that, I swapped my projects over to my new laptop and Nuget was apparently broken.

It seems to have updated properly now.

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...