Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ICompress interface #487

Merged
merged 1 commit into from
Sep 28, 2019
Merged

add ICompress interface #487

merged 1 commit into from
Sep 28, 2019

Conversation

dabutvin
Copy link
Contributor

laying the groundwork from the discussion in #467

This doesn't change any behavior, only sets up the framework

We can open new issues with the following template to support any number of arbitrary libraries/algorithms moving forward.

new file called SomethingCompress.cs and implement the 3 functions

namespace CompressImagesFunction.Compressors
{
    public class SomethingCompress : ICompress
    {
        public string[] SupportedExtensions => new[] { ".XXX", ".YYY" };

        public void LosslessCompress(string path)
        {
            throw new System.NotImplementedException();
        }

        public void LossyCompress(string path)
        {
            throw new System.NotImplementedException();
        }
    }
}

Register the new compressor so we start picking it up at the top of CompressImages.cs

Update the Dockerfile.CompressImages file to properly install the library on the image

@dabutvin dabutvin merged commit b1d8f3d into master Sep 28, 2019
@dabutvin dabutvin deleted the i-compress branch September 28, 2019 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant