|Home||Installation||User Guide||Technical Info|
|Processing Multiple Files|
|Stamping Picture Comments|
|Choosing the Color of Date Text|
|Setting Point Size of Text|
|Changing the Font|
|Location of the Date text|
|Vertical orientation of the Date text|
You may however wish to change the default date format which is a bit verbose. For this you can refer the Date Format Helper page to get the -datefmt option for the date format you desire. For example for a date text like Fri 10/1/04, 2:48 pm you can use the below command:
jdatestamp -datefmt "%a @m/@d/%y, @h:%M %pl" -outfile your_output_file.jpg your_input_file.jpgYou can default your preferred date format and also other options in the jdstmprc.txt file in the Jdatestamp installation and also in ~/.jdstmprc (Which overrides values in jdstmprc.txt) in UNIX so that you do not have to type them every time.
The tag @f can be used instead of the output file name in the -outfile option to refer to the name of the currently processed input file.
The below example stamps all .jpg files under "C:\My Documents\photos" and stores the output in "C:\stamped_photos":
jdatestamp -datefmt "%a @m/@d/%y, @h:%M %pl" -outfile "C:\stamped_photos\@f" "C:\My Documents\photos\*.jpg"You can also stamp the input files directly without copying the output using the @F tag. Be sure that you want to do this before running the command since it will date stamp the files irreversibly. The below example command stamps all the photos in the directory "C:\for_prints" overwriting them:
jdatestamp -outfile @F "C:\for_prints\*.jpg"
Below are two examples to include the picture comments:
jdatestamp -datefmt "@C:%a @m/@d/%y, @h:%M %pl" -outfile "C:\stamped_photos\@f" "C:\My Documents\photos\*.jpg" jdatestamp -datefmt "%a @m/@d/%y, @h:%M %pl@I2, " -outfile "C:\stamped_photos\@f" "C:\My Documents\photos\*.jpg"In the first example The comment is prefixed before the date with a ':'. If the picture has a comment Florida the the stamped text is like: Florida:Fri 10/1/04, 2:48 pm. In case a picture does not have a comment the the ':' is not included in the stamped text.
In the second example the comment is added after the date text and ', ' is appended to it like: Fri 10/1/04, 2:48 pm, Florida. 2 is added after @I to indicate that the 2 characters (comma and blank) following the tag are to be added if there is a comment and skipped otherwise. @C: in the first example is the short form of @C1:.
jdatestamp -color red -outfile "C:\stamped_photos\@f" "C:\My Documents\photos\*.jpg" jdatestamp -color 100:240:100 -outfile "C:\stamped_photos\@f" "C:\My Documents\photos\*.jpg" jdatestamp -color 0xFF00FF -outfile "C:\stamped_photos\@f" "C:\My Documents\photos\*.jpg"
jdatestamp -pointsize 40 -outfile "C:\stamped_photos\@f" "C:\My Documents\photos\*.jpg" jdatestamp -pointsize 40x -outfile "C:\stamped_photos\@f" "C:\My Documents\photos\*.jpg"In the second case the pointsize is 40 for a 2 megapixel (1200x1600) image. However for higher or lower image dimensions the actual pointsize used is scaled relative to a 2 megapixel image. This would result in the same relative size. It is better to use relative settings because you can use the same settings for a picture from a different camera, say from a friend.
You can however specify your own font. Font names are not recognized. You have to give a font file. Example:
jdatestamp -font "C:\WINNT\Fonts\georgiaz.ttf" -pointsize 50x -outfile "C:\stamped_photos\@f" "C:\My Documents\photos\*.jpg"To find a windows font file name right click on the file and choose properties.
You can also use the aliases left, right, or center for the option -x and top, bottom, or center for the option -y. left and top are the same as 80x and right and bottom are the same as -80x. center is the same as 50%.
Note that the Jdatestamp defaults for -x and -y are -100x which is slightly more than -80x corresponding to right and bottom.
jdatestamp -x center -pointsize 50x -outfile "C:\stamped_photos\@f" "C:\My Documents\photos\*.jpg" jdatestamp -x -150 -y 75% -pointsize 50x -outfile "C:\stamped_photos\@f" "C:\My Documents\photos\*.jpg" jdatestamp -x 80x -y top -pointsize 50x -outfile "C:\stamped_photos\@f" "C:\My Documents\photos\*.jpg"
jdatestamp -rotate 90 -outfile "C:\stamped_photos\@f" "@C:\vertical_pics.txt"In case your camera has a gravity sensor to detect a vertical camera you can omit this option or pass auto and the angle will be read from the EXIF.
jdatestamp [optional-switches] -outfile fileName -font Font file -pointsize pointsize inputfile[...]Open a Windows command prompt or MSYS prompt if you have it installed and Type jdatestamp or jdatestamp -h for command line options. Below is similar information with some more details.
You can specify any of the switches for the program in the jdstmprc.txt file in the Jdatestamp installation. This file is present in the installation with commented examples. The options specified in this file serve as program defaults. In case of UNIX these can be overridden by personal default values in ~/.jdstmprc. These are overridden by the command line arguments. The program/personal default values are listed in the program usage as (Your Default for this option: <value>). You can clear the default for any argument by passing --, -font -- for example. This would cause the Jdatestamp default to be used. You can clear all default argument by passing -- as the first argument to jdatestamp.
On Windows you can use either forward slash "/" as or backward slash "\" for directory paths unless you are using MSYS.
Input Jpeg file(s). You can specify the file(s) as
one or more of the following:
jdatestamp <required options> photo.jpg @C:\temp\pictureList.txt
Output File. The following placeholders are useful
in case of multiple input files:
@f: Input File Name, @p: File Name Prefix
jdatestamp <other options> -outfile C:\newimages\@d2@f "c:\my photos\**\*.jpg"
|-datefmt Format String||
Format String similar to strftime C function.
Common strftime options:
%d: Date, %m: Month number, %y/%Y: 2/4 digit year
In addition the below jdatestamp extensions are available:
@d: Date without leading zeroes
@I[n]<nchars>: Similar to @C but but the n chars are prefixed to the comment instead of suffixing.
@f: Input Image File Name.
@n: Input Image File Name without the suffix.
Also you can follow the strftime options %a, %A, %b, %B and %p with a l or u to convert it to lowercase or uppercase respectively.
|X Pixel location of top left corner of date from top left corner of image. A negative value specifies the x distance of the bottom right corner of the date from the bottom right corner of the image. If the position is followed by x then the value is scaled relative to a 2 megapixel image. If a % is specified it specifies the % of space to the left of date text. left is same as 80x, right as -80x and center as 50%.|
|Y Pixel location of date text. See description of -x option for more info.|
If an angle is specified through -rotate option or
present in EXIF, -x and -y options are applied
relative to the upright image. For example for options:
-x right -y bottom -rotate 90
The text is rotated clockwise -90 degrees (i.e 90 degrees counter-clockwise) and the vertical text is on the top right corner. Now when the output image is rotated 90 degrees clockwise to make it upright the date text is upright at the bottom right corner as expected from the -x and -y option values.
If the x or y location causes the date text to go out of the image the value is adjusted so that the date text is "pushed" inside the image.
Also the x and y coordinates are rounded to the nearest JPEG DCT boundary (Usually 8, 16 or 24 pixels) to enable lossless crop/drop
-x 500 -y 200 positions the date text at location (500, 200) pixels
from top left of image.
|-rotate auto|[+|-]0|90|180|270||Specifies the clockwise angle the image should be rotated to make it upright. The text is rotated and positioned so that when the output image is made upright the date text is upright and positioned according to the -x and -y arguments if present. The image itself is not rotated. If auto is specified for this option then the angle is read from the EXIF header. The angle information is correctly set in the EXIF if the camera has a gravity sensor to detect camera angle, otherwise it would be 0. The default for this option is auto.|
|-tmpdir tmpDir||Temporary Directory to be used. Defaults to /tmp (C:/temp for Windows)|
Color of date text specified as either auto for auto color
assignment based on background or the color name or
Red Green Blue components each ranging from 0-255
or as a 6 digit (24 bit) hex value. jdatestamp looks in the
colors.txt file in the installation to convert the color-name
specified to RGB and gives an error if it cannot find the
color-name specified. The default is auto.
|-trans 0-100||Transparency of text. The Default is 0 which means the text is opaque.|
|-bgcolor color_name|R:G:B|0x<hexval>||Color of background. The default is yellow. Note that one of the options -bgcolor, -bgtrans, -bginset must be used for a background|
|-bgtrans 0-100||Transparency of background. The Default is 60.|
Background inset in absolute or relative pixels if followed by an x.
Inset in y direction can be specified separately if desired.
Examples -bginset 4, -bginset 3.5x, -bginset 3x:2x.
|-bordercolor color_name|R:G:B|0x<hexval>||Color of Border. The default is red. Note that one of the options -bordercolor, -bordertrans, -borderwidth must be used for a border|
|-bordertrans 0-100||Transparency of background. The Default is 0.|
|-borderwidth pixels[x][:yPixels[x]]||Border width in absolute or relative pixels. See -bginset option for examples. The default is 5x|
|-timeofs [+|-] [[[days:]hrs:]mins:]sec||
Offset time to be added (Subtracted if prefixed with -) to
|-font Font file||
Path to a scalable font file like True Type (.ttf
file) or Postscript (.pfb file). The Default is
the font file (VeraBI.ttf) in jdatestamp installation.
|-fontmetric Font Metric file||
Path to the Font Metric File for font formats like postscript
where font metrics are in a separate file. For .pfb/.pfa font
files it defaults to the corresponding .afm/.pfm file if
Point Size. If followed by x the actual pointsize is scaled
relative to a 2 megapixel image so that the relative text size
is the same. The Default is 47x.
|-time ctime|mtime|atime|systime|"yyyy:mm:dd[ HH:min:ss]"||
Time to be stamped in case Exif time information is not
Possible values: ctime/mtime/atime: File
Specifies When -time option should be used.
never: -time Option is not used and jdatestamp gives an error if Exif time
is not available.
|-keepfiletime yes|no||Specifies if the output file timestamp is to be set to that of the input file stamp. The default is to do so when the file ctime/mtime/atime is used for stamping|
Sets the debug level for messages printed. Values are:
0: No Messages except for those coming from
The Default is 3.
|-listcolors||Lists names of available colors along with their values in R:G:B and hex format. Other options are ignored. You can also refer the colors.html file for this.|
|-copyexif yes|no||Specifies if the Exif header is to be copied to output. The default is yes.|
|-gencolors||Generates the colors.html file. Uses the -outfile option if supplied, otherwise creates the colors.html file in the current directory.|
|-mkdir yes|no||Specifies if directories should be created for outfile. If this is no you will get an error if the directory for the output file does not exist. The Default is Yes.|
|-text Text||Write Text instead of date. -datefmt and -timeofs options are ignored. You can use -datefmt option also for this purposes but you have to escape the @'s and %'s in your text so that they are not interpreted.|
|Home||Installation||User Guide||Technical Info|