Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


This forum is in read only mode, you can no longer reply
  • Louis Ferreira 69 posts 266 karma points
    Sep 06, 2017 @ 10:25
    Louis Ferreira
    0

    Applying filter to image not working?

    Hi,

    I'm trying to use ImageProcessor with the greyscale filter, but it throws an exception when using just the filter (?filter=greyscale). If I use other attributes, it no longer throws an exception, but does not apply the filter (?height=200&filter=greyscale).

    My code to generate the url is as follows:

    var imageUrl = image.GetCropUrl(300, 300, furtherOptions: "&filter=greyscale");
    

    and this outputs the following url

    http://localhost:49772/media/1262/chair.jpg?anchor=center&mode=crop&width=300&height=300&filter=greyscale&rnd=131491687990000000
    

    This does return the image, but no filter is applied i.e. the image is still full colour.

    If I query the image directly with just the filter as follows:

    http://localhost:49772/media/1262/chair.jpg?filter=greyscale
    

    then the server throws an exception.... server error

    Any one else experience this?

  • James Jackson-South 489 posts 1747 karma points c-trib
    Sep 06, 2017 @ 11:10
    James Jackson-South
    100

    Hi Louis,

    That's expected. Filters are disabled by default, you have to enable them in the processing.config file.

    Cheers

    James

    P.S update to the latest version. It doesn't throw, just ignores

  • Louis Ferreira 69 posts 266 karma points
    Sep 06, 2017 @ 11:21
    Louis Ferreira
    0

    Awesome James.... thank you!

  • James Jackson-South 489 posts 1747 karma points c-trib
    Sep 06, 2017 @ 11:35
    James Jackson-South
    0

    No worries, happy to help. :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies