zimmer9
asked on
Do you know how to write a C# function to create a .TIF image file ?
I am writing a C# application using VS2010 and .Net Framwork 4.0.
Do you know how to write a C# function to create a .TIF image file that contains the statement: Image Not Available
As for the properties of the .TIF image file, preferably it would have a width of about 1700 pixels and a height of about 650 pixels.
You can look at the attached ImageNotAvailable.docx for the properties of another .TIF image file I am also working with.
Do you know how to write a C# function to create a .TIF image file that contains the statement: Image Not Available
As for the properties of the .TIF image file, preferably it would have a width of about 1700 pixels and a height of about 650 pixels.
You can look at the attached ImageNotAvailable.docx for the properties of another .TIF image file I am also working with.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Rectangle ImageSize = new Rectangle(0, 0, 1024, 1024);
I used the wrong value s/b
Rectangle ImageSize = new Rectangle(0, 0, 1024, 512);
I used the wrong value s/b
Rectangle ImageSize = new Rectangle(0, 0, 1024, 512);
ASKER
How can the following code be modified to center the text?
Bitmap bmp = new Bitmap(1024, 512);
using (Graphics graph = Graphics.FromImage(bmp))
{
Rectangle ImageSize = new Rectangle(0, 0, 1024, 1024);
StringFormat sf = new StringFormat();
sf.LineAlignment = StringAlignment.Center;
sf.Alignment = StringAlignment.Center;
graph.FillRectangle(Brushe
graph.DrawString("IMAGE NOT AVAILABLE", new Font("Tahoma", 50), Brushes.Black, ImageSize, sf);
}
bmp.Save(TARGET_DIR_IN + "_Blank.TIF");