This is an Azure Serverless Function that takes opaque images with white backgrounds and converts them to transparent images.
A Blob Trigger pointing to an existing Azure Storage Container is used to trigger the function. It is triggered when new images are placed in the container.
A Blob Output is used to store the resulting transparent image in a different container.
ImageMagick is used for image processing and the default output is a transparent 180x180 WebP format.
The blob trigger binding and blob output binding can be changed in BlobTrigger.cs
.
[BlobTrigger("trigger-container/{name}")] Stream original,
[Blob("processed-container/{name}", FileAccess.Write)] BlockBlobClient outClient,
The function can run locally using Azure Function Tools or deployed to an existing Azure Function using the .NET 6 runtime.