473,804 Members | 3,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem outputting GIF file when loaded into Bitmap object

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

Dim imgMap As New
Bitmap(System.D rawing.Image.Fr omFile(Server.M apPath("origina l.gif")))

Response.Conten tType = "image/gif"

imgMap.Save(Res ponse.OutputStr eam,
System.Drawing. Imaging.ImageFo rmat.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"
Nov 18 '05 #1
1 1094
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" <re*@spumco.com > wrote in message
news:sl******** ********@carbon .redbrick.dcu.i e...
Hi,
I output a GIF file, loaded into a Bitmap, as follows:

Dim imgMap As New
Bitmap(System.D rawing.Image.Fr omFile(Server.M apPath("origina l.gif")))

Response.Conten tType = "image/gif"

imgMap.Save(Res ponse.OutputStr eam,
System.Drawing. Imaging.ImageFo rmat.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"

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3537
by: Jeroen Ceuppens | last post by:
Hi, When I draw a bitmap on a form, the bitmapdrawing disappears when I move the form, how is it possible to lock the drawing so it stays visible when you move or do somethings else.... Thx Jeroen
4
3729
by: Saso Zagoranski | last post by:
Hi! Here is what I'm trying to do: I have created a UserControl named PictureView. It holds all the images in one directory in the Bitmap images variable. The selected image is displayed in the PictureBox control. Here is how it works.
1
3671
by: D. Yates | last post by:
I can't seem to figure out why I can't StretchBlt an image that I have loaded from my hard drive. There are two button events below. The first button event, btnFormStretch_Click, works fine, but the second one, btnStretch_Click, does not. The only difference seems to be the way that I get the source graphic object. The first method uses the forms graphic object whereas the second uses the Graphics.FromImage method. Any ideas? ...
2
3031
by: Sharon | last post by:
I encountered a strange behavior when doing ‘new Bitmap’: The following code works fine and the given bitmap file is shown on the PictureBox (the m_DrawArea) in the correct bitmap sizes: private Graphics m_gMapImg; private Bitmap m_backroundImage; private Bitmap MapImg; private PictureBox m_DrawArea;
2
4456
by: ajikoe | last post by:
Hi, I tried to follow the example in swig homepage. I found error which I don't understand. I use bcc32, I already include directory where my python.h exist in bcc32.cfg. /* File : example.c */ #include <time.h>
7
2322
by: Nathan Sokalski | last post by:
I am having a problem saving an image with the same name it originally had. I have two similar versions of my code, one in which I close the FileStream used to open the original image before saving, the other in which I close the FileStream afterwards, although both return the same error. Here are the two versions of the code and the errors they each return (NOTE: I rebooted immediately before running each of these versions so that I knew they...
0
1556
by: Ben3eeE | last post by:
I got one too hard for me to fix problem. I know the cause and i know why but i cant fix it. I am using a "Rubber band" like function, drawing a rectangle on an image in a picturebox that i loaded. Now i want to Cut out the part i marked with the "Rubber band" and load that image in the picturebox. This works great and i can save that image as i want to. The problem is that the image loaded is smaller cause when i load the image i use...
3
2951
by: =?Utf-8?B?dGtpZWhs?= | last post by:
I have large 1bpp tiff scans of arch. drawings that are typically 12032x16890 pixels (filesize is about a 1 meg +/-) While I can readily view smaller (dimension) files, when I try to do anything after loading I've looked at most of the samples on the web in using GDI+... they all fall over dead with these large files. Any help is appreciated.
0
2434
by: raylopez99 | last post by:
I have a minor problem locating an image file to load as a Bitmap. A resource file "NudeSusan.jpeg" (which I think is actually a bmp file, originally taken from a jpeg of model Susan Spears) is loaded onto the "Resources" tree of the Visual Studio Solutions Explorer, and correctly works. However, another file, "MyImageFile.png" (which is also a bmp file, sorry for the confusion, but originally was a png file), does not work. How can...
0
9576
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10310
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10074
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7613
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4291
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2983
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.