Asp.net Error while loading GIF image

marumba

New Member
I have an aspx page that return image responsei read the required image and size from the query string and then open it and redraw to new image with new size, it works fine with .png .bmp .jpg but when trying to load a gif image an exception is thrown.\[code\]Image img = System.Drawing.Image.FromFile(imgPath);\[/code\]the resulted exception was\[code\]System.OutOfMemoryException: Out of memory. at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement)\[/code\]i tryied\[code\]Image img = new Bitmap(imgPath);\[/code\]the resulted exception was\[code\]System.ArgumentException: Parameter is not valid. at System.Drawing.Bitmap..ctor(String filename)\[/code\]this happens only with gif images and i tried many working gif image files the images are not corrupted they work fine on windows explorer and viewer and was saved using painti also tried small gif images( ~= 1k), the problem still foundi tried a windows application and no exceptions found it worked finethe exceptions appears only on the asp.netwhat is the problem?
 
Back
Top