In .Net Core, System.Drawing.Common library is provided for image manipulation.
However, if you are hosting your .Net core app in Linux and you are referencing System.Drawing.Common, you may need to install some native dependencies first.
Scott Hanselman wrote a great article on this which you can find here.
Recently, we needed to deploy a .Net core image processing service hosted in in AWS Fargate. Our DevOps team set up a CI/CD pipeline where we can deploy the app into AWS Fargate simply by pushing our code to Git and configuring our docker file.
One obstacle I had was how do I install the native libraries needed for image processing in the AWS Fargate container instance.
I tried to add a code snippet in the docker file to run the following commands but it did not work:
The answer is to add this following snippet into your Dockerfile:
Special shoutout to my great colleague, Kamlesh Bhatt, in helping us to sort this out.