Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Drawing / July 2005

Tip: Looking for answers? Try searching our database.

Writing Text on an Image.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sameer - 28 Jul 2005 15:16 GMT
Hi,
My ASP.net applicatian uploads images up to my webserver, and in the process
compressess it and decreases the size as well. Now there is one other feature
that i want to include in it as well, the bottom part of the iamge shold have
my company name on it in kind of like transparent ( but not totallY) fonts
but still visible ,Just like how you could see through a design on the glass
but the design is still visible. this is to make sure that no body steals the
images and use it for there own purpose.

Please suggest!!!
Sameer
James Westgate - 28 Jul 2005 17:10 GMT
1. Create a new System.Drawing.Bitmap class and load it with the image
2. Get a graphics object from the Bitmap using Graphics.FromImage(bitmap)
3. Use DrawStrign to draw on the graphics object eg on the bitmap.
4. Save the file as another filename (you cannot overwrite, otherwise make a
copy before changing or load into stream first)
5. Dispose the graphics object

James

Signature

Create interactive diagrams and flowcharts with ERM Diagram at
http://www.crainiate.net

Take the ERM Tour at http://www.flowchartcontrol.com

> Hi,
> My ASP.net applicatian uploads images up to my webserver, and in the
[quoted text clipped - 12 lines]
> Please suggest!!!
> Sameer
sameer - 28 Jul 2005 17:45 GMT
is there any website where i might be able to find some code which describes
this? Not really a .net guy

> 1. Create a new System.Drawing.Bitmap class and load it with the image
> 2. Get a graphics object from the Bitmap using Graphics.FromImage(bitmap)
[quoted text clipped - 21 lines]
> > Please suggest!!!
> > Sameer
Morten Wennevik - 28 Jul 2005 23:13 GMT
Hi Sameer,

The process is the same for drawing on a picture as drawing on a windows Form or any Control.  Just google for samples on how to use Graphics.DrawString.  In any case, you might find this page useful.

http://www.codeproject.com/aspnet/TextOnImage.asp

> is there any website where i might be able to find some code which describes
> this? Not really a .net guy
[quoted text clipped - 30 lines]
>> > Please suggest!!!
>> > Sameer

Signature

Happy coding!
Morten Wennevik [C# MVP]


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.