0

While creating a ImageResizer function app on azure portal for accomplishing image resizing functionalities I see only two Azure Blob Storage outputs:

Path 1: sample-images-sm/{name}

Path 2: sample-images-md/{name}

enter image description here

Here my requirement is generate images of different sizes with the following combination:

<width,height> : (260,260) , (280,150) , (340,140), (115,140), (76,140)

Can anyone help me to know how to add additional Azure Blob Storage output to the existing list.

santosh kumar patro
  • 7,231
  • 22
  • 71
  • 143
  • Where can I find this screen? – Mikhail Shilkov Sep 06 '18 at 19:29
  • Once you select the Type: ImageResizer and start filling up the details like setting up the input path and output path including the source and destination container. You will see the section on the left hand side. Any help on this is much appreciated. – santosh kumar patro Sep 06 '18 at 20:32

1 Answers1

0

Go ahead and create a Function based on those settings.

Then navigate to Integrate tab on the left and click New Output on the right:

enter image description here

Select Azure Blob Storage and then fill the fields similar to this:

enter image description here

Finally, change the code to add an extra parameter:

public static void Run(
    Stream image,                           // input blob, large size
    Stream imageSmall,
    Stream imageMedium,
    Stream imageMy)  // output blobs
{
    // ...
    // use imageMy to write another size of image
}
Mikhail Shilkov
  • 34,128
  • 3
  • 68
  • 107
  • Thanks Mikhail for your reply. I already did an POC on the same lines using Azure Cognitive services and function app but facing issues with that solution.Any help on this is much appreciated. Can you please help me to know is there any issue with the code here. I have posted at : https://stackoverflow.com/questions/52202426/resized-image-getting-corrupted-using-azure-functions – santosh kumar patro Sep 07 '18 at 08:28
  • Code sample will help me much here in this case – santosh kumar patro Sep 07 '18 at 09:37
  • Hi Mikhail as per your inputs, I tried but see the same issue in this case also. I have mentioned all the details at : https://stackoverflow.com/questions/52225151/image-dimensions-getting-corrupted-using-imageresizer-with-azure-function-app – santosh kumar patro Sep 07 '18 at 14:59