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
  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 22, 2015 @ 10:57
    Dave Woestenborghs
    0

    After upgrading cropping is not working

    Hi James,

    I just upgraded Image Processor as discussed on twitter. The problem now is that cropping doesn't work anymore for some images.

    These image processor modules I have installed.

    ImageProcessor 2.2.3.0
    ImageProcessor.Web 4.2.1.0
    ImageProcessor.Web.PostProcessor 1.0.2.0

    A url for a crop that isn't working is :
    /media/3605/moeder-logo.jpg?crop=0.04349713164251208,0.0030193236714975845,0.026551177536231849,0.067028985507246341&cropmode=percentage&width=308&height=308&rnd=130709910260000000

    A url for a crop that is working is this :
    /media/3608/warhorse-logo.jpg?anchor=center&mode=crop&width=308&height=308&rnd=130709910270000000

    The error i'm seeing is this

    [IndexOutOfRangeException: Index was outside the bounds of the array.]
       ImageProcessor.Web.Processors.Crop.MatchRegexIndex(String queryString) +653
       ImageProcessor.Web.<>c__DisplayClass5.<AutoProcess>b__1(IWebGraphicsProcessor x) +30
       System.Linq.WhereListIterator`1.MoveNext() +235
       System.Linq.Buffer`1..ctor(IEnumerable`1 source) +488
       System.Linq.<GetEnumerator>d__0.MoveNext() +145
       System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +536
       System.Linq.Enumerable.ToList(IEnumerable`1 source) +76
       ImageProcessor.Web.ImageFactoryExtensions.AutoProcess(ImageFactory factory, String queryString) +389
       ImageProcessor.Web.HttpModules.<ProcessImageAsync>d__10.MoveNext() +3468
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +85
       System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar) +88
       System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +166

    Any ideas what is wrong ?

    Dave

     

     

     

     

  • James Jackson-South 489 posts 1747 karma points c-trib
    Apr 22, 2015 @ 11:39
    James Jackson-South
    1

    This is one of those "works on my machine" moments. Then again I'm using the new parsing engine I'm building for ImageProcessor.Web.

    I must have introduced a compatibility issue whilst fixing a bug with the cropper.

    The old url parser was stupid - I'm putting my hands up here. I was doing complicated, idiotic things with regular expressions and poor man`s parsing when I should have been using more of the built in conversion tools available backed up with custom type converters.

    I should have released a much smaller set of instructions available for the Web Api also but I can't backtrack on that.

    I'm gonna try and finish and release the latest ImageProcessor.Web this evening. (I'm on final testing) and get a full suite release out with updated version dependencies to everything is in sync.

    Just to note. Those urls you have given me are doing two entirely different things so they're not comparable.

    1. The first is cropping using the Crop processor then performing a resize using Resize with ResizeMode.Pad.
    2. The second is performing a resize using Resize with ResizeMode.Crop
  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 22, 2015 @ 11:41
    Dave Woestenborghs
    0

    Okay.. I will rollback the update for now. And will try again tomorrow

    Thx for the update

  • James Jackson-South 489 posts 1747 karma points c-trib
    Apr 22, 2015 @ 23:48
    James Jackson-South
    100

    That's me updated everything. It should all work.

Please Sign in or register to post replies

Write your reply to:

Draft