Skip to content

A Windows Forms application for printing dates on photos

License

Notifications You must be signed in to change notification settings

jakubriegel/DateThem_print_dates_on_photos

Repository files navigation

DateThem!

about

DateThem! is a simple app for simple pourpose. It solves the lack of date printing ability in modern cameras and majority of software. Just select folder with photos, click Date Them! and it will do the rest.

image

implementation

After the user selects folder, the application using Directory.GetFiles() creates an array of paths to every .jpg file inside it. Then the dating logic is proceeded for every image.

The app uses properties stored with an image to get its date and dimentions, which are neccesary for positioning the date. In order to do that it creates an Image object from FileStream created from the path to the photo. Then using PropertyItem the properties are being retrieved. It also stores all the other properties, for adding them back to picture after dating.

Position of the date is being calculated using constant percentage value of picture dimensions, this way no matter of the image size on the computer screen it will be in the same place. Then the ImageProccesor comes in. ImageFactory.Watermark() prints the date on the photo. Then after original photo has been deleted, the one with date printed is being saved in the current path. It is worth mentioning, that before saving the image it receives all properties from the original one. Otherwise it would loose things like orientation, dimentions and date.

screens

before: image-before

after: image-after

credits

Icon made by Smashicons from www.flaticon.com is licensed by CC 3.0 BY