Copied to clipboard

Flag this post as spam?

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


  • Kristoffer Eriksen 185 posts 465 karma points
    Jan 22, 2016 @ 20:05
    Kristoffer Eriksen
    0

    Parameter is not valid - Image Cropper

    Hey I'm using Image Cropper to generate a crop for a page I'm using this code to get the image

    <img src="@Url.GetCropUrl(course, "courseImage", "SpotImage")" class="img-responsive"/>
    

    course is an IPublishedContent

    It returns this URL

    http://golftour.kedev.dk/media/1003/17.jpg?crop=0.21867085044009935,0.28404661548707327,0.54575063264541812,0.45144417253877095&cropmode=percentage&width=760&height=640&rnd=130979698120000000
    

    The image is ok at http://golftour.kedev.dk/media/1003/17.jpg

    Can't figure out what is wrong. Do you have an idea?

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 22, 2016 @ 20:21
    Jeavon Leopold
    0

    Hello,

    Have you updated the source image from when the crop was originally set?

    Could you try adjusting the crop slightly and resaving to see if fixes the issue?

    Jeavon

  • Kristoffer Eriksen 185 posts 465 karma points
    Jan 22, 2016 @ 22:16
    Kristoffer Eriksen
    0

    I've tried to delete the image, and upload a new one. I've tried to upload a new image to another page.

    Same result with both

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 23, 2016 @ 00:13
    Jeavon Leopold
    0

    That does sound very strange, could you screen shot the crop selection in the back office?

  • Kristoffer Eriksen 185 posts 465 karma points
    Jan 24, 2016 @ 19:43
    Kristoffer Eriksen
    0

    Hey Jeavon Here is two screenshot. One of the contentsection with the cropping, and one from the developer section enter image description here

    enter image description here

  • Kristoffer Eriksen 185 posts 465 karma points
    Jan 24, 2016 @ 19:49
    Kristoffer Eriksen
    0

    Damn... I tried using the crop "MainImage" and that worked. I then checked the spelling on "SpotImage" on both the view and the datatype. They were the same, and didn't work. I then renamed SpotImage to SpotImages (the extra s), and now it works ...

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 24, 2016 @ 20:01
    Jeavon Leopold
    0

    That's odd, had you previously changed the crop sizes on the data type since the media had been uploaded?

  • Kristoffer Eriksen 185 posts 465 karma points
    Jan 24, 2016 @ 20:04
    Kristoffer Eriksen
    0

    Hey Jeavon

    It's acting strange :-) When I rename the crop, I can get an image. If I then resize the crop, the image is gone again. If I then rename the crop, the image is shown again. But just until I resize the crop ... very strange ...

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 24, 2016 @ 20:25
    Jeavon Leopold
    0

    When you saying resizing the crop are you changing the size values on the data type?

  • Kristoffer Eriksen 185 posts 465 karma points
    Jan 24, 2016 @ 20:33
    Kristoffer Eriksen
    0

    No, I mean resizing in the content-section. Changing the cropped section of the image.

  • Kristoffer Eriksen 185 posts 465 karma points
    Jan 27, 2016 @ 11:01
    Kristoffer Eriksen
    0

    My cowworker and me just created another new site based on umb7.3.5 with the same issue.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 27, 2016 @ 11:17
    Jeavon Leopold
    0

    I also notice you have ImageProcessor.Web v4.5.0.0, perhaps you could try updating to the latest v4.5.1.0 to check it's not something that has been fixed already?

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 27, 2016 @ 11:11
    Jeavon Leopold
    0

    It seems to be the first parameter that is causing the issue, I've reduced the decimal points and it begins to work, e.g.

    http://golftour.kedev.dk/media/1003/17.jpg?crop=0.21867085,0.28404661548707327,0.54575063264541812,0.45144417253877095&cropmode=percentage

    When you create the SpotImage crop are you zooming/moving etc, could you post a screenshot of the selection?

  • Bo Jacobsen 606 posts 2404 karma points
    Jan 27, 2016 @ 11:14
    Bo Jacobsen
    0

    yes i got the same issue.

    Cropped url returned:

    /media/1002/image.png?crop=0.2284628893269845,0.055500507453816253,0.24991580001682764,0&cropmode=percentage&width=570&height=550&rnd=130983683940000000
    

    Return this error: enter image description here

    If i change the crop to:

    /media/1002/image.png?crop=0,0,0.24991580001682764,0&cropmode=percentage&width=570&height=550&rnd=130983683940000000
    

    Then the image will be displayed like this: (with padding in top and bottom, positioned in the middle) enter image description here

    And it should fill it all.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 27, 2016 @ 11:19
    Jeavon Leopold
    101

    Actually yes, are your servers/local machines both using a non English culture? It seems v4.5.1.0 fixes a bug with non English cultures so I think it might be the case!

  • Kristoffer Eriksen 185 posts 465 karma points
    Jan 27, 2016 @ 11:41
    Kristoffer Eriksen
    0

    Hej Jeavon That solved the problem. The ImageProcessor dll is the one from the default umbraco-install.

    Maybe Umbraco need to update them in the project as well

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 27, 2016 @ 11:43
    Jeavon Leopold
    1

    Yes, it's already done for v7.3.6, see http://issues.umbraco.org/issue/U4-7792

  • Robert Dyson 50 posts 147 karma points c-trib
    Sep 20, 2016 @ 16:05
    Robert Dyson
    0

    I'm having the same problem as this in 7.5.4.

    If I upload the image and publish immediately, the crop loads correctly. If I change the crop I get "Parameter is not valid."

    The machine is English. Is there anything I can do to correct this?

  • John Seto 37 posts 98 karma points
    Sep 21, 2016 @ 00:09
    John Seto
    0

    I'm running 7.4.3 and have come up against the same problem.

    I've updated Imageprocessor to the latest version no joy.

  • Maria 34 posts 128 karma points
    Feb 10, 2017 @ 07:44
    Maria
    0

    I am having the same problem in Umbraco 7.5.8 and ImageProcessor 4.8.0...

  • Maria 34 posts 128 karma points
    Feb 10, 2017 @ 08:18
    Maria
    0

    Nope, sorry. In my case error occured due to "ToStringing" the url.

  • M N 125 posts 212 karma points
    Jun 02, 2017 @ 18:32
    M N
    0

    I was experiencing the same.. 7.5.11 .. and also large files.. Here's everything I did

    /config/imageprocessor/processing.config (lot of my clients images were just over 5000 so I bumped this to 6000

         <settings>
            <setting key="MaxWidth" value="6000"/>
            <setting key="MaxHeight" value="6000"/>
          </settings>
    

    web.config

    <httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5" maxRequestLength="951200" executionTimeout="9999" fcnMode="Single" />
    

    web.config -> in system.webserver

    <security>
              <requestFiltering>
                <requestLimits maxAllowedContentLength="204800000" />
              </requestFiltering>
    </security>
    

    Lastly,

    IIS -> AppPool -> Advanced Settings -> Enable 32-Bit Application = FALSE

    Hope it helps anyone.. Forcing 64 bit seems to have resolved the instances where Invalid Paramater was being thrown in the logs. Extra precision ftw i suppose.

    GL

  • Scott 95 posts 277 karma points
    Oct 23, 2018 @ 08:00
    Scott
    1

    For what it is worth, then in our case setting "Enable 32-Bit Application" to FALSE did the trick.

Please Sign in or register to post replies

Write your reply to:

Draft