473,473 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Convert picture from TIFF to GIF

Hi.

In an ASP.NET page, I am converting from a TIFF picture, that has a palette
of 2 colors (1 bit), to a GIF, using the the code below, and it works fine.

The problem is that the GIF always gets a palette of 256 colors (8 bits). Is
there a way to force the GIF to have only 2 colors?

Thanks in advance.
'============= BEGIN MY CODE ===============
Dim img As System.Drawing.Bitmap

img = System.Drawing.Bitmap.FromFile(Server.MapPath("/") & "pic1.tiff")

img.Save(Server.MapPath("/") & "pic2.gif",
System.Drawing.Imaging.ImageFormat.Gif)

img.Dispose()
img = Nothing
'============= END MY CODE ===============

Nov 22 '05 #1
0 913

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

Similar topics

4
by: Dominic | last post by:
Hi guys, In .NET, how can I convert a HTML file to TIFF efficiently? One possible way is that I can first use word automatation to load the HTML up and then print it to TIFF. Is that right?...
0
by: Nicolas Guilhot | last post by:
Hi all ! I have a multi-page Tiff image file that I want to convert to PDF. To do so I am using iText library. The conversion is working, but the code execution is very different according to...
0
by: josemarciano | last post by:
Hi. In an ASP.NET page, I am converting from a TIFF picture, that has a palette of 2 colors (1 bit), to a GIF, using the the code below, and it works fine. The problem is that the GIF always...
5
by: dirk nerlich | last post by:
Hi I want too create a picture database.How can I link a picture(tiff, JPG) on one datafield? If I use ole objekt I only see the filename but not the picture. Further I will give some information...
5
by: Fabio | last post by:
private void Apri_Click(object sender, System.EventArgs e) { OpenFileDialog fileChooser=new OpenFileDialog(); //fileChooser.Filter="tiff images (*.tiff)|*.tiff"; DialogResult result =...
4
by: Pushp | last post by:
Hello friends, Can any body tell me the sample code to convert a Tiff image to a Gif or Jpeg format. The Resolution of picture is a big concern keeping in mind. Hope to get the response...
0
by: josemarciano | last post by:
Hi. In an ASP.NET page, I am converting from a TIFF picture, that has a palette of 2 colors (1 bit), to a GIF, using the the code below, and it works fine. The problem is that the GIF always...
0
by: Ayman | last post by:
Hi All, I develop an application to send fax using Dialogic card. I have to convert any file need to be sent to tiff file. I can convert any image file to tiff, but I would like to know how to...
0
by: gcorgnet | last post by:
Hi all, I have a set of Multipage Tiff documents that are to be sent to a web browser. So, I want to convert them to Gif (or Png) before sending them to the client. Those Tiff docs are bitonal...
4
by: vikramjagan | last post by:
Hi, This is my first attempt at coding in microsoft .NET platform. I am trying to gather information on whether it is possible to code a program in .NEt (either VB.NET or C#.NET) to open a Tiff...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.