Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: image ImageProcessing , +
How to create a time stamp on picture in c#. because when i am saving the image then it over write the already available saved picture . so i want to create a time stamp.
i am new to c#, if any one tell me the code i will be thankful.
Posted 22-Jun-11 4:42am
asma89396
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
asma89 at 22-Jun-11 9:57am
   
how can i use this water mark to be a time stamp ?
Marcus Kramer at 23-Jun-11 10:04am
   
You just have to replace the text or image string being used as the watermark with a string representation of the time stamp you want.
SAKryukov at 22-Jun-11 12:34pm
   
Good sources, my 5.
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Here you go.
 
Get the date time & put it in right location on image.
 
C# Snippet Tutorial - How to Draw Text on an Image[^]
Dynamically Write Text On An Image[^]
Generate Image from text using C# OR Convert Text in to Image using C#[^]
Adding Text To Image Programmatically With C#[^]
 
BTW I'm sorry I couldn't reply you because I was/am busy with interviews. What's the status?
  Permalink  
Comments
SAKryukov at 22-Jun-11 12:34pm
   
My 5.
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Use somthing like this to create the file name:
 
String fileName = String.Format(@"{0}\image-{1}.jpg", path, DateTime.UtcNow.Ticks);
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

You can get the timestamps from the current version of the file before you save the new image by calling:
 
File.GetCreationTime()
File.GetLastAccessTime()
File.GetLastWriteTime()
 
You can save any or all of these values and then after you save your image call the appropriate File.SetXxxTime() method using the previously saved value.
 
I'm not sure if this is what you are looking for, but I hope it helps.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Mathew Soji 334
1 Maciej Los 295
2 BillWoodruff 290
3 Afzaal Ahmad Zeeshan 257
4 DamithSL 225
0 OriginalGriff 6,369
1 Sergey Alexandrovich Kryukov 5,973
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 4,045


Advertise | Privacy | Mobile
Web04 | 2.8.1411019.1 | Last Updated 22 Jun 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100