title: LocalReport Render Fails with Images from Nikon Coolpix 5600
body: <p>i have a RDLC with a embedded Image taken with a Nikon Coolpix 5600 that raises the following error when i call the Render function.</p>
  
  <p>example image:
  <strike><a href="http://img140.imageshack.us/img140/4906/dscn1559u.jpg" rel="nofollow noreferrer">http://img140.imageshack.us/img140/4906/dscn1559u.jpg</a></strike> (Dead Link)</p>
  
  <p>does somebody know what`s wrong with that image?</p>
  
  <p>The Error:</p>
  
  <pre><code>    [ArgumentOutOfRangeException: Nicht negative Zahl erforderlich.
  Parametername: value]
     System.IO.MemoryStream.set_Position(Int64 value) +7679482
     Microsoft.ReportingServices.Rendering.ImageRenderer.CanvasPDF.MonochromeJpeg(MemoryStream memStream) +601
     Microsoft.ReportingServices.Rendering.ImageRenderer.CanvasPDF.ProcessImage(CanvasImagePDF image, Double left, Double top, Double width, Double height, Boolean scaleImage) +1656
     Microsoft.ReportingServices.Rendering.ImageRenderer.CanvasPDF.DrawImage(OutlineObjects outlines, CanvasImage image, Double left, Double top, Double width, Double height) +235
     Microsoft.ReportingServices.Rendering.ImageRenderer.Image.RenderToPage(Measurement parentClipBorder) +1275
     Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder) +485
     Microsoft.ReportingServices.Rendering.ImageRenderer.Rectangle.RenderToPage(Measurement parentClipBorder) +373
     Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder) +246
     Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.ProcessPages(CompositionBase theComposition, Report theReport, Boolean needTotalPages, Int32 startPage, Int32 endPage, Boolean render) +912
     Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport.RenderReport(Report report, NameValueCollection deviceInfo, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStreamCallback, Int32 streamPageNumber) +652
     Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream) +81
  
  [ReportRenderingException: Fehler beim Rendern des Berichts.]
     Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream) +142
     Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc, CreateReportChunk cacheDataCallback, Boolean&amp; dataCached) +1775
  
  [WrapperReportRenderingException: Fehler beim Rendern des Berichts.]
     Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc, CreateReportChunk cacheDataCallback, Boolean&amp; dataCached) +2417
     Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc) +72
     Microsoft.Reporting.LocalService.RenderWithDataCache(PreviewItemContext itemContext, ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, IRenderingExtension renderer, ReportProcessing repProc, CreateAndRegisterStream createStreamCallback, ReportRuntimeSetup runtimeSetup) +2069
     Microsoft.Reporting.LocalService.Render(PreviewItemContext itemContext, Boolean allowInternalRenderers, ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, CreateAndRegisterStream createStreamCallback, ReportRuntimeSetup runtimeSetup, ProcessingMessageList&amp; warnings) +441
     Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]&amp; warnings) +364
  
  [LocalProcessingException: Fehler bei der lokalen Berichtsverarbeitung.]
     Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]&amp; warnings) +418
     Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, String&amp; mimeType, String&amp; encoding, String&amp; fileNameExtension, String[]&amp; streams, Warning[]&amp; warnings) +199
     Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, String&amp; mimeType, String&amp; encoding, String&amp; fileNameExtension, String[]&amp; streams, Warning[]&amp; warnings) +57
     HrmSuite.MvcWebClient.EmployeePresentation.Render(Guid guid, String&amp; mimeType, String reportMapPath, Boolean anonym) in C:\VS2008\HrmSuite\HrmSuite.MvcWebClient\Reports\EmployeePresentation.vb:226
     HrmSuite.MvcWebClient.EmployeeController.RenderReport(Guid guid, Boolean anonym) in C:\VS2008\HrmSuite\HrmSuite.MvcWebClient\Controllers\EmployeeController.vb:152
     lambda_method(ExecutionScope , ControllerBase , Object[] ) +230
     System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
     System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +178
     System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +24
     System.Web.Mvc.&lt;&gt;c__DisplayClassa.&lt;InvokeActionMethodWithFilters&gt;b__7() +52
     System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +254
     System.Web.Mvc.&lt;&gt;c__DisplayClassc.&lt;InvokeActionMethodWithFilters&gt;b__9() +19
     System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +254
     System.Web.Mvc.&lt;&gt;c__DisplayClassc.&lt;InvokeActionMethodWithFilters&gt;b__9() +19
     System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +192
     System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +399
     System.Web.Mvc.Controller.ExecuteCore() +126
     System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +27
     System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7
     System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +151
     System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +57
     System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7
     System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
     System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +75
  </code></pre>
  
  <hr>
  
  <p><strong>Edit</strong></p>
  
  <p>the EXIF Data seems to be the cause, still investigating :)</p>