Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Drawing;
- using SixLabors.ImageSharp;
- namespace tiff;
- internal class Program
- {
- static void Main(string[] args)
- {
- string fileName = "image.tiff";
- int width = 650;
- int height = 434;
- FileStream fs = new System.IO.FileStream(fileName, System.IO.FileMode.Open);
- Image img = Image.FromStream(fs);
- fs.Close();
- Graphics g = Graphics.FromImage(img);
- g.FillRectangle(Brushes.Black, 5, 5, 100, 30);
- g.DrawRectangle(Pens.Black, 5, 5, 100, 30);
- g.Dispose();
- img.Save("new.tiff", System.Drawing.Imaging.ImageFormat.Tiff);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement