How to Watermark Images via Command Line

If you want to make sure your copyrights are protected and no one will use the images you create without explicit permission, watermarking your images is the best solution. But this implies editing each image so that it includes a personalized text or image which appears transparently, with customizable size and position. Many people might find that to be a complicated task, involving a series of repetitive operations.

However, we are convinced watermarking your images shouldn’t be a difficult, time-consuming or costly process. And for this reason we recommend using ReaConverter Pro for adding watermarks, especially in case you are a developer or an advanced user who would like to integrate this feature in his own customized solution. As opposed to many other converters, reaConverter Pro not only supports a GUI interface, but can also be operated through command-line or Watch folder. Which means it can help you integrate a large variety of image editing features in your very own custom solution.

How can you watermark a series of images using command line? Just follow these easy steps:

Create action file

Create a file with the .act (action) extension, which includes the Watermark action. How? Start the conversion process normally, by opening reaConverter and moving directly to the Edit images tab. Click + add action button and choose Watermark from the dropdown menu. After you pick the type of watermark you intend to use (image or text) and its features, use Save action file as… What will result is the .act file you will need in order to process this feature through command-line. Make sure you remember where you saved it.

Run CMD

Open the cmd tool or a third party application that enables you to use it. Here you can issue commands written as text lines. Though more difficult to use than the GUI (graphical user) interface – because it requires more knowledge about how to write command lines and thus it is addressed mainly to developers and advanced users, command line is very effective when a complex set of tasks is involved, such as watermarking a large number of images.

Start cons_rcp.exe

Use reaConverter’s command-line tool, cons_rcp.exe, to process over 500 images file formats, including PDF, JPG, TIFF and many others. Make full use of the .act file you have created and include Watermarking in your own customized software solution.

Example

Here is the example on how to apply watermark with text on your images:

cons_rcp.exe -s "C:\Path_to\input_file.jpg" -o "C:\Path_to\output_file.jpg" -text_watermark t"Text Watermark Here" pos50x50% op100 fn"Arial" fs24 b

Watermarking with image:

cons_rcp.exe -s "C:\Path_to\input_file.jpg" -o "C:\Path_to\output_file.jpg" -image_watermark p"C:\Path_to\watermark.png" pos10x10% op50 rot90 mt

Dynamic watermarks:

cons_rcp.exe -s "C:\Path_to\input_file.jpg" -o "C:\Path_to\output_file.jpg" -text_watermark datetime pos50x50% op100 fn"Arial" fs24 b

You can also watermark images with primitive drawings:

cons_rcp.exe -s "C:\Path_to\input_file.jpg" -o "C:\Path_to\output_file.jpg" -line pos50x50 size100x100 rgb(66,137,212) p2 aa

For a complete guide on how to use command-line in order to integrate reaConverter’s features in your own developing project, you can read Command Line Interface Reference Guide