This is a migrated thread and some comments may be shown as answers.

PngBitmapEncoder problem with large images

1 Answer 82 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
muhalet
Top achievements
Rank 1
muhalet asked on 03 Feb 2012, 11:48 AM
Method Save in PngBitmapEncoder for large image(~300Kb) throwing exception:
Index was outside the bounds of the array.
   at Telerik.Windows.Media.Imaging.Zip.Tree.Code(Int32 dist)
   at Telerik.Windows.Media.Imaging.Zip.DeflateManager.CompressBlock(Int16[] ltree, Int16[] dtree)
   at Telerik.Windows.Media.Imaging.Zip.DeflateManager.FlushBlock(Int32 buf, Int32 stored_len, Boolean eof)
   at Telerik.Windows.Media.Imaging.Zip.DeflateManager.FlushBlockOnly(Boolean eof)
   at Telerik.Windows.Media.Imaging.Zip.DeflateManager.ProcessSlowDeflate(Int32 flush, Int32& num)
   at Telerik.Windows.Media.Imaging.Zip.DeflateManager.SlowDeflate(Int32 flush)
   at Telerik.Windows.Media.Imaging.Zip.DeflateManager.Deflate(ZipBaseStream strm, Int32 flush)
   at Telerik.Windows.Media.Imaging.Zip.ZipBaseStream.Deflate(Int32 flush)
   at Telerik.Windows.Media.Imaging.Zip.ZipOutputStream.WriteInternal(Byte[] buf, Int32 offset, Int32 count)
   at Telerik.Windows.Media.Imaging.Zip.ZipOutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at Telerik.Windows.Media.Imaging.PngBitmapEncoder.WriteDataChunks()
   at Telerik.Windows.Media.Imaging.PngBitmapEncoder.Encode(WriteableBitmap image)
   at Telerik.Windows.Media.Imaging.PngBitmapEncoder.Save(Stream stream)
   at Datawatch.Dashboard.XAML.Designer.Pages.Editor.DashboardEditorPage.SaveEntity()
   at Datawatch.Dashboard.XAML.Designer.MainPage.SaveEntityClick(Object sender, RoutedEventArgs e)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at Telerik.Windows.Controls.RadButton.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

Maybe exist some workarounds?

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 07 Feb 2012, 05:57 PM
Hi Muhalet,

Thank you for the feedback.

We would appreciate it if you could send us the image and some code (if relevant) so that we can reproduce this problem and narrow it down.
Looking forward to your reply.

Greetings,
Martin
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ImageEditor
Asked by
muhalet
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or