U4-5078 - ImageProcessor: Arithmetic operation resulted in an overflow.

Created by Rasmus Eeg 12 Jun 2014, 09:15:37 Updated by Rasmus Eeg 02 Oct 2014, 06:51:05

Relates to: U4-5573

Hi there, There seams to be a flaw in the ImageProcessor, when inserting images trough RTE. http://test4.datagraf.dk/media/1011/tid_tekniker.gif?width=475&height=155

http://test4.datagraf.dk/media/1011/tid_tekniker.gif does exsist. Am i missing a config?

UPDATE: Working locally, but not remote.

2014-06-12 11:25:36,289 [71] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 64] An unhandled exception occurred System.OverflowException: Arithmetic operation resulted in an overflow. at ImageProcessor.Imaging.Quantizer.FirstPass(BitmapData sourceData, Int32 width, Int32 height) at ImageProcessor.Imaging.Quantizer.Quantize(Image source) at ImageProcessor.ImageFactory.FixIndexedPallete() at ImageProcessor.ImageFactory.Save(String filePath) at ImageProcessor.Web.HttpModules.ImageProcessingModule.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar) at System.Web.HttpApplication.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar)


James South 16 Jun 2014, 08:47:06

Hi there,

This is a known problem; You need to update ImageProcessor via nuget to the latest version as there was a bug on 64bit chipsets within the quantizer - basically an int which should have been a long.


Sebastiaan Janssen 16 Jun 2014, 08:52:50

I've updated our dependency so that 7.1.5 will get the latest IP version by default.

Rasmus Eeg 16 Jun 2014, 08:55:42


Sebastiaan Janssen 16 Jun 2014, 08:58:45

Fixed in revs 49574a2c8e6508d585f377804ae6a9e59b86a036 and e09f11a17cfcac80c565aabde8d7eb4c96161ef1

Rasmus Eeg 02 Oct 2014, 06:46:32

Okey, so here i go again. I've got the latest version of umbraco installed, but unable to update ImageProcessor to 2.0

'''Package Manager Console:''' PM> Install-Package ImageProcessor.Web.Config Attempting to resolve dependency 'ImageProcessor (≥'. Attempting to resolve dependency 'ImageProcessor.Web (≥'. Installing 'ImageProcessor'. Successfully installed 'ImageProcessor'. Installing 'ImageProcessor.Web'. Successfully installed 'ImageProcessor.Web'. Installing 'ImageProcessor.Web.Config'. Successfully installed 'ImageProcessor.Web.Config'. Install failed. Rolling back... Install-Package : Updating 'ImageProcessor' to 'ImageProcessor' failed. Unable to find a version of 'UmbracoCms.Core' that is compatible with 'ImageProcessor'. At line:1 char:1

  • Install-Package ImageProcessor.Web.Config
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

Priority: Normal

Type: Performance Problem

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.1.5


Story Points: