G
Guest
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 ===============
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 ===============