1
Vote

NullReferenceException when processing png

description

When attempting to resize png to png, a NullReferenceException is thrown:

Processing image 'C:\Users\blah\a.png' to 'C:\Users\blah\output\1.png' failed!
System.NullReferenceException: Object reference not set to an instance of an object.
at PaintDotNet.InternalFileType.<>c__DisplayClass6.<FinalSave>b__5(Object sender, ProgressEventArgs e) in D:\src\pdn\pdn_35x\src\Data\InternalFileType.cs:line 500
at PaintDotNet.Data.Quantize.Quantizer.FirstPass(BitmapData sourceData, Int32 width, Int32 height, ProgressEventHandler progressCallback) in D:\src\pdn\pdn_35x\src\Data\Quantize\Quantizer.cs:line 164
at PaintDotNet.Data.Quantize.Quantizer.Quantize(Image source, ProgressEventHandler progressCallback) in D:\src\pdn\pdn_35x\src\Data\Quantize\Quantizer.cs:line 107
at PaintDotNet.FileType.Quantize(Surface quantizeMe, Int32 ditherAmount, Int32 maxColors, Boolean enableTransparency, ProgressEventHandler progressCallback) in D:\src\pdn\pdn_35x\src\Data\FileType.cs:line 245
at PaintDotNet.PngFileType.OnFinalSave(Document input, Stream output, Surface scratchSurface, Int32 ditherLevel, SavableBitDepths bitDepth, PropertyBasedSaveConfigToken token, ProgressEventHandler progressCallback) in D:\src\pdn\pdn_35x\src\Data\PngFileType.cs:line 201
at PaintDotNet.InternalFileType.FinalSave(Document input, Stream output, Surface scratchSurface, Int32 ditherLevel, Int32 threshold, SavableBitDepths bitDepth, PropertyBasedSaveConfigToken token, ProgressEventHandler progressCallback, Double progressStart, Double progressEnd) in D:\src\pdn\pdn_35x\src\Data\InternalFileType.cs:line 503
at PaintDotNet.InternalFileType.OnSaveT(Document input, Stream output, PropertyBasedSaveConfigToken token, Surface scratchSurface, ProgressEventHandler progressCallback) in D:\src\pdn\pdn_35x\src\Data\InternalFileType.cs:line 443
at PaintDotNet.FileType2.OnSave(Document input, Stream output, SaveConfigToken token, Surface scratchSurface, ProgressEventHandler callback) in D:\src\pdn\pdn_35x\src\Data\FileType2.cs:line 42
at PaintDotNet.FileType.Save(Document input, Stream output, SaveConfigToken token, Surface scratchSurface, ProgressEventHandler callback, Boolean rememberToken) in D:\src\pdn\pdn_35x\src\Data\FileType.cs:line 310
at PDNBulkUpdater.OutputFile.Process(UpdateContext ctx, Dictionary2 saveTokens, IProcessingEventListener events, Int32 index)
at PDNBulkUpdater.Util.ProcessImages(UpdateContext ctx, Dictionary
2 saveTokens, IProcessingEventListener events)

comments