Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > problem outputting GIF file when loaded into Bitmap object

Reply
Thread Tools

problem outputting GIF file when loaded into Bitmap object

 
 
Stimp
Guest
Posts: n/a
 
      10-22-2004
Hi,
I output a GIF file, loaded into a Bitmap, as follows:

Dim imgMap As New
Bitmap(System.Drawing.Image.FromFile(Server.MapPat h("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:
http://www.redbrick.dcu.ie/~stimpy/g...s/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
--

"I hear ma train a comin'
.... hear freedom comin"
 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      10-22-2004
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

"Stimp" <> wrote in message
news:...
> Hi,
> I output a GIF file, loaded into a Bitmap, as follows:
>
> Dim imgMap As New
> Bitmap(System.Drawing.Image.FromFile(Server.MapPat h("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:
> http://www.redbrick.dcu.ie/~stimpy/g...s/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
> --
>
> "I hear ma train a comin'
> ... hear freedom comin"



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! How can I draw a bitmap only with BITMAP information! xqggz C++ 1 06-19-2007 03:07 PM
Bitmap -> GIF/PNG/JPG Michael Mahemoff Ruby 1 05-21-2007 12:00 PM
convert a bitmap file into a jpg file ? MoshiachNow Perl Misc 2 05-03-2007 02:02 PM
How to convert a base 64 encoded GIF image to a *.gif file? hb ASP .Net 6 09-28-2004 08:24 PM
Masked bitmap from bitmap Gandalf Python 0 01-29-2004 09:41 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57