PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
AddImage gets "Out of memory" Error when using GIF Format https://forum.pdfsharp.net/viewtopic.php?f=2&t=1439 |
Page 1 of 1 |
Author: | YAMU [ Thu Nov 25, 2010 12:34 pm ] |
Post subject: | AddImage gets "Out of memory" Error when using GIF Format |
Hi, I have to load an image in my PDF and I do this by using PdfSharp.Drawing; ... Image image = row.Cells[1].AddImage(string.Format("{0}\\myImage.gif", HttpContext.Current.Server.MapPath("~/img/"))); ... This works well on all systems but not on my Windows Server 2008. Changing the image to a png Format works. Has anyone an idea why gif doesn't work on windows server 2008? Did PDFsharp miss some settings on the server for the gif? I can open a gif-File without of problems from the file system. Thanks Hans |
Author: | Thomas Hoevel [ Thu Nov 25, 2010 2:07 pm ] |
Post subject: | Re: AddImage gets "Out of memory" Error when using GIF Format |
PDFsharp relies on the operating system to read the images. Different OS routines are used for GDI+ and WPF builds. If mspaint.exe can read the GIF files, then PDFsharp should also be able to use them. But you may have to switch from GDI+ to WPF or the other way round. Was that image downloaded from the Internet? Unblock the image if it is blocked (see Properties for that file within Explorer). |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |