Yes, itβs really possible, you can do this by deploying WebJob using BlobTrigger, which takes the input stream for the newly created blob and allows you to modify it to the output block, the code will look like this using the excellent .NET library image:
public static void ResizeMicroImages( [BlobTrigger("orig/{name}.{ext}")] Stream input, [Blob("90x126/{name}.png", FileAccess.Write)] Stream output ){ ImageBuilder.Current.Build(new ImageJob(input, output, new Instructions() { AutoRotate = true, Width = 90, Height = 126, OutputFormat = OutputFormat.Png, })); }
However, in our setup, we encountered problems when we reach a large number of photos with the help of a web husband throwing OutOfMemoryExceptions, when he performs an initial check of raw drops, but this may be specific to our installation (we have many photos). We manually changed the addition of the message to the storage queue and instead performed the webjob procedure using QueueTrigger.
jakobandersen
source share