Copied to clipboard

Flag this post as spam?

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


  • Nicholas Wright 24 posts 144 karma points notactivated
    Jan 22, 2019 @ 11:24
    Nicholas Wright
    0

    Image issues

    Hi

    We've got a funny on a production site , on Azure - as a web application

    All images are going via image processor

    The site is on Umbraco version 7.10.4

    https://www.sitename.co.uk/media/1044/hands-on-blueprints_4460x4460.jpg?anchor=center&mode=crop&width=400&height=300&rnd=131695627660000000

    Parameter is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentException: Parameter is not valid.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ArgumentException: Parameter is not valid.] System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format) +1144773 ImageProcessor.Common.Extensions.ImageExtensions.Copy(Image source, AnimationProcessMode animationProcessMode, PixelFormat format, Boolean preserveExifData) +589 ImageProcessor.ImageFactory.Load(Stream stream) +332 ImageProcessor.Web.HttpModules.

    We're mirrored the site locally and it works

    Has anyone seen this issue before ?

    Regards

  • Rhys Hamilton 140 posts 942 karma points
    Jan 22, 2019 @ 12:05
    Rhys Hamilton
    0

    I haven't encountered this specific issue personally, so it might be a bit of a shot in the dark, but I've known of a few instances where the "parameter is not valid" exception occurs as a consequence of an OutOfMemoryException when trying to process a file.

    It could be that it's running the process in 32-bit on Azure, rather than 64-bit, causing the exception and throwing the error. This might explain why everything runs fine locally but not on the live site.

  • Nicholas Wright 24 posts 144 karma points notactivated
    Jan 22, 2019 @ 12:47
    Nicholas Wright
    0

    Thanks Rhys,

    Thanks for the reply.

    We've switched it to 64 bit, stopped and restarted the site but the error still occurs.

    Regards

  • Rhys Hamilton 140 posts 942 karma points
    Jan 22, 2019 @ 14:57
    Rhys Hamilton
    0

    Ah, I see... that's ashame that didn't resolve things for you!

    I think this still might have something to do with available memory on your server - it's the only thing that seems to ring a bell (and make sense).

    See here the following issues (same error as the one you've encountered), which make reference to that and provide some more detailed explanations on it.

    1. https://github.com/JimBobSquarePants/ImageProcessor/issues/531
    2. https://github.com/JimBobSquarePants/ImageProcessor/issues/472

    If you're just looking for a quick-fix, I suppose you could always resize the original image in the media folder manually and then re-upload it to the back-end.

    Granted, it's not the most glamorous of solutions, but it should do the trick!

  • Oliver 6 posts 75 karma points
    Oct 02, 2019 @ 05:50
    Oliver
    0

    @Nicholas did you find a solution to your problem? I´m experiencing a similar one.

  • Istvan Pszota 59 posts 191 karma points
    Jun 19, 2020 @ 09:36
    Istvan Pszota
    0

    On a Umbraco instance running on Azure Application Service we were able to solve the issue by switching the platform from 32bit to 64bit.

Please Sign in or register to post replies

Write your reply to:

Draft