• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 29 رای - 2.9 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: چاپ متن بر روی PictureBox و ذخیره آن به صورت عکس
حالت موضوعی
#1
سلام دوستان عزیز. من میخوام روی یک picturebox یه متن رو چاپ کنم و اون رو به عنوان عکس ذخیره کنم.
اما اررور میده
من سورس این برنامه رو میذارم. ببینید مشکل از کجاست
با تشکر
downLoad
 
پاسخ
#2
How To Write Text On Images Using C#
You have an image and want to create a signature of your name on it. You can easily Write Text On Images for such purpose by using any Image Editor program. But if you want to create an Application which will do this work for you, then its very easy to create such Application in C#.

Instructions:
1.Create a new instance of Image class which will hold the the Image from your Computer on which we will Write Text.


Image img = Image.FromFile(@"D:/image.jpg");

2.Now create new instance of Graphics class which will be used to manipulate this Image and Write Text on it.


Graphics graphic = Graphics.FromImage(img);

3.Now use this Graphics class instance to Write Text on our Image by using DrawString method of Graphics class.


graphic.DrawString("How To Ideas", new Font("Arial", 14), new SolidBrush(Color.AntiqueWhite), new PointF(450.0f, 400.0f));

4.In above line first parameter is the String which we want to Write on Image, 2nd parameter is the Font which will be used to Write Text, 3rd parameter is the SolidBrush which is used to actually paint the text on Image, 4th parameter is the location on Image where we want to Write Text.
5.Now you can either save this Image or just can show in PictureBox. If you don’t know how to save an Image then see my article on How To Save An Image Using C#. If you want to show this Image in PictureBox, then here is simple code for that.


pictureBox1.Image = img;


Here is the output I get in PictureBox after running this code.
[عکس: image_thumb19.png]

Download Source Code
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
 
پاسخ
  


موضوعات مشابه ...
موضوع نویسنده پاسخ بازدید آخرین ارسال
  پرسش در باره ذخیره عکس در دیتا بیس mesmaeil 1 3,276 08-31-2012، 11:31 PM
آخرین ارسال: Amin_Mansouri
  سورس کد ذخیره تصویر از وب سایت (سی شارپ) Amin_Mansouri 0 3,216 05-02-2012، 04:15 PM
آخرین ارسال: Amin_Mansouri
  ذخیره متن و ارسال ان به ایمیل adibkurd 1 4,650 02-19-2012، 07:26 PM
آخرین ارسال: Amin_Mansouri
  رنگ آميزي سطر هاي DataGridView به صورت يك در ميان Ghoghnus 1 4,752 12-02-2011، 11:50 AM
آخرین ارسال: analyze
  نوشتن اطلاعات یک جدول به صورت فایل xml در یک فایل xml Ghoghnus 0 2,718 10-31-2011، 03:23 PM
آخرین ارسال: Ghoghnus
  طریقه ذخیره یک عکس با فرمتهای مختلف Ghoghnus 0 2,505 10-31-2011، 03:11 PM
آخرین ارسال: Ghoghnus
  ارسال عکس به دیتابیس(ذخیره عکس در دیتابیس) Ghoghnus 0 2,831 10-31-2011، 03:05 PM
آخرین ارسال: Ghoghnus
  سورس کد ذخیره کردن محتویات لیست باکس در فایل Amin_Mansouri 0 7,758 10-20-2011، 06:15 PM
آخرین ارسال: Amin_Mansouri
  چاپ متن بر روی PictureBox و ذخیره آن به صورت عکس Ghoghnus 1 2,895 07-31-2011، 04:33 PM
آخرین ارسال: امیر

پرش به انجمن:


Browsing: 1 مهمان