private void InitExamples() { textW = new TextW(); imgW = new ImgW(); mouse = new Mouse(); soloImg = new SoloImg(); dirImg = new DirImg(); extensions = new Extension(".jpg", ".png", ".jpeg", ".bmp"); }
public void IfWaterImg(Graphics g, SoloImg soloImg, ImgW imgW) { Bitmap b = new Bitmap(soloImg.Image.Width, soloImg.Image.Height); using (g = Graphics.FromImage(b)) { g.DrawImage(soloImg.Image, 0, 0, soloImg.Image.Width, soloImg.Image.Height); g.DrawImage(imgW.ImgWatermark, OriginCoordinate.X, OriginCoordinate.Y, 85, 85); } b.Save("Copy_ImgW_" + Counter.Count.ToString() + ".bmp"); }
public void IfDirImg(Graphics g, DirImg dirImg, Mouse mouse, PictureBox pictureBox1, ImgW imgW) { foreach (Image image in dirImg.Images) { Counter.Count++; OriginCoordinate.X = (image.Width * mouse.X) / pictureBox1.Width; OriginCoordinate.Y = (image.Height * mouse.Y) / pictureBox1.Height; Bitmap b = new Bitmap(image.Width, image.Height); using (g = Graphics.FromImage(b)) { g.DrawImage(image, 0, 0, image.Width, image.Height); g.DrawImage(imgW.ImgWatermark, OriginCoordinate.X, OriginCoordinate.Y, 85, 85); } b.Save(@"pictures with a watermark/Copy_" + Counter.Count.ToString() + ".bmp"); } }
public void IfImgWatermark(Graphics g, ImgW imgW, Mouse mouse, ToolStripMenuItem saveBtn) { g.DrawImage(imgW.ImgWatermark, mouse.X, mouse.Y, 50, 50); saveBtn.Enabled = true; imgW.IsImgWatermark = false; }
public void MoveImgDraw(Graphics g, ImgW imgW, Mouse mouse) { g.DrawImage(imgW.ImgWatermark, mouse.X, mouse.Y, 50, 50); imgW.IsMoveImg = false; }