PngBitmapEncoder problem with large images

2 posts, 0 answers
  1. muhalet
    muhalet avatar
    1 posts
    Member since:
    Feb 2011

    Posted 03 Feb 2012 Link to this post

    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?
  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    104 posts

    Posted 07 Feb 2012 Link to this post

    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 >>

  3. DevCraft banner
Back to Top