Resize Images using Azure Functions

Written by ppolyzos

Software engineer based in Athens, Greece

4 Comments

    1. ppolyzos

      This is a bit tricky as by default the output Stream is set to application/octet-stream and CloudBlockBlob can’t be used for output binding. However, you can declare CloudBlockBlob as “inout” in function.json file and it will work properly.

      function.json

      And the function code to achieve custom ContentType is the following:

  1. Tushar

    2017-06-02T13:45:21 Welcome, you are now connected to log-streaming service.
    2017-06-02T13:45:23.809 Function compilation error
    2017-06-02T13:45:23.809 (1,7): error CS0246: The type or namespace name ‘ImageResizer’ could not be found (are you missing a using directive or an assembly reference?)
    2017-06-02T13:45:23.809 (2,7): error CS0246: The type or namespace name ‘ImageResizer’ could not be found (are you missing a using directive or an assembly reference?)
    2017-06-02T13:45:23.809 (8,28): error CS0246: The type or namespace name ‘Instructions’ could not be found (are you missing a using directive or an assembly reference?)
    2017-06-02T13:45:23.809 (11,16): error CS0103: The name ‘FitMode’ does not exist in the current context
    2017-06-02T13:45:23.809 (12,17): error CS0103: The name ‘ScaleMode’ does not exist in the current context
    2017-06-02T13:45:23.809 (14,5): error CS0103: The name ‘ImageBuilder’ does not exist in the current context
    2017-06-02T13:45:23.809 (14,36): error CS0246: The type or namespace name ‘ImageJob’ could not be found (are you missing a using directive or an assembly reference?)
    2017-06-02T13:45:31.387 Script for function ‘ImageResizer’ changed. Reloading.
    2017-06-02T13:45:31.718 (2,7): error CS0246: The type or namespace name ‘ImageResizer’ could not be found (are you missing a using directive or an assembly reference?)
    2017-06-02T13:45:31.718 (3,7): error CS0246: The type or namespace name ‘ImageResizer’ could not be found (are you missing a using directive or an assembly reference?)
    2017-06-02T13:45:31.718 (9,28): error CS0246: The type or namespace name ‘Instructions’ could not be found (are you missing a using directive or an assembly reference?)
    2017-06-02T13:45:31.718 (12,16): error CS0103: The name ‘FitMode’ does not exist in the current context
    2017-06-02T13:45:31.718 (13,17): error CS0103: The name ‘ScaleMode’ does not exist in the current context
    2017-06-02T13:45:31.718 (15,5): error CS0103: The name ‘ImageBuilder’ does not exist in the current context
    2017-06-02T13:45:31.718 (15,36): error CS0246: The type or namespace name ‘ImageJob’ could not be found (are you missing a using directive or an assembly reference?)
    2017-06-02T13:45:31.718 warning AF004: Missing binding argument named ‘inputBlob’. Mismatched binding argument names may lead to function indexing errors.
    2017-06-02T13:45:31.718 Compilation failed.

    I am always getting this error I tried everything

Leave a Comment

Your email address will not be published. Required fields are marked *