473,394 Members | 1,879 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,394 software developers and data experts.

Converting 2 colors 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 18 '05 #1
0 1112

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

Similar topics

1
by: RootShell | last post by:
Hello How can i use the GD Library to only show the White (or the hex value of white) pixels of a image? Imagine i have a 8 color picture in PNG format. This is to use on a color puzzle...
2
by: AES/newspost | last post by:
In my (limited) experience, downloading a lengthy PDF file (a users manual or a lengthy report) from a web site can take a fair amount of time even on a fast connection, and readable content...
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...
0
by: mark | last post by:
Somebody can explain me why if I put a color with SetPixel the color showed is of another value? For example: I've to draw a grayscale image. The color RGB(90,90,90) become RGB(40,45,60). In the...
4
by: Jmc | last post by:
Hi Need some advice on how to get all colors in an image. I wish to have an input file, in my case it will be a scanned piece of fabric. I would like to first of all gen an array with all the...
1
by: dishal | last post by:
Can anyone help me please? How do I convert these codes to launch from a JFrame instead of a Java Applet? A simple program where the user can sketch curves and shapes in a variety of...
2
by: mndprasad | last post by:
hi all i am doing a project in java where i need to convert 10 jpeg images into a single tiff image..conversion of single jpeg image to single tiff is happening but embedding all the 10 jpeg images...
0
by: Magnus Bergh | last post by:
I am looking for some good solution to convert PDF files to TIFF (which in turn will be stored in a database). I know there are a bunch of commercial options out there but most are to expensive or...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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...
0
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...

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.