problem outputting GIF file when loaded into Bitmap object

S

Stimp

Hi,
I output a GIF file, loaded into a Bitmap, as follows:

Dim imgMap As New
Bitmap(System.Drawing.Image.FromFile(Server.MapPath("original.gif")))

Response.ContentType = "image/gif"

imgMap.Save(Response.OutputStream,
System.Drawing.Imaging.ImageFormat.Gif)


I normally do some additional actions on the bitmap before saving, but
I'm keeping this simple for this example..

The response thread outputs the gif... the problem is that the GIF
appears 'dotty'. i.e. it seems the pallete of the GIF gets mixed up
somewhere along the way

Here is the original GIF:
www.redbrick.dcu.ie/~stimpy/graphics/original.gif

Here is the result GIF after the above ASP code has processed:
www.redbrick.dcu.ie/~stimpy/graphics/result.gif

Any ideas how I could get the output GIF to appear as normal?

Thanks!
Peter
 
K

Kevin Spencer

Offhand, it looks like you're using a different pallette in the result gif.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top