473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 910

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.