Add Text to Pictures in Batch dynamically from Excel and CSV files

I guess that’s familiar to you: You have finished a shooting, edited your pictures with Lightroom and before publishing the samples in the internet, you are going to resize and rename the photos and watermark them. You hopefully use bulkWaterMark therefore, because putting your photos into the app to add text to pictures in batch is a no-brainer without any effort. This is probably the most typical use case of bulkWaterMark.

Like a serial letter of watermarks in pictures

But bulkWaterMark can do a lot more for you than just inserting the same static text in every picture again and again. Of course, you probably have already seen our tutorials on the blog about inserting dynamic text in photos. Until now we have just given you hints for using image metadata in watermarks. Today I would like to show you how to get completely external data depending on the photo you are going to watermark into your protected pictures. But what do I mean with external data? I’m thinking of an Excel Workbook as data source, similar to the serial letter feature of Microsoft Word that takes names and addresses from an Excel spreadsheet.

You all know the serial letter feature of Word. Dynamic We are just doing the same in bulkWaterMark – instead of inserting the dynamic data into a letter, we are putting the data directly into a photo you are going to watermark.

Excel!? I want to add dynamic text into pictures!

But Excel is a spreadsheet program!? Why should I use a Microsoft Office app for putting data into watermarks?

It simple: By using bulkWaterMark Data Expressions, you can read from Excel Workbooks, search for a particular row and return any cell data of that found row that can be used as text for your watermark. Because most people like and understand Excel, we thought that it is a nice idea to use Excel as primary data source for so-called text data watermarks. As an alternative, you can also use CSV files if you want a more open source data format.

Examples of use

Many of our customers are already using this features. The most typical use case for is explained in our sample below, but I would like to give so some really creative examples of use, that we would not have thought of when developing the features.

Cardealers are using Data Expressions for creating photos for used car exchange websites. Pictures of offered cars are getting watermarked not only with the car dealer’s logo, but also with specific car data like its price or mileage.

Another customer has implemented a watermark template that generates a personal deck of Happy Family cards out of a bunch of images. This was achieved by using the image border layer of bulkWaterMark. The bottom of the border contains the occupation types that are fetched from an Excel spreadsheet.

Add text to pictures from Excel cells

Assume that we have thousands of pictures and a likewise long list of data that includes annotations for each photo. In our tutorial sample I have a list of filenames that contains the name of  the photographer and the copyright holder of each photo. This is how it looks like:

Image Copyright
Our “database” of copyright holders

The first column contains the name of each file we want to watermark, called “Filename”. We need this column to identify which image belongs to each row of data. The next column are the data columns and contain the name of the photographer (“Photographer”) and the name of the copyright owner (“Copyright”).

Our database and structure is defined – time to launch bulkWaterMark and create a new watermark template in the Profile Editor. First we are adding a new text layer and switch to the Expression Editor:

Insert Text Watermark and open the Expression Editor
Insert Text Watermark and open the Expression Editor

Now it’s getting interesting: We have to choose our data source now, which is the previously introduced Excel worksheet. Therefore, click onto the gear icon next to the Data Expression Context to configure the data source.

Setting a data source for our watermark
Setting a data source for our watermark

After defining a file (you can either use an Excel or CSV file), bulkWaterMark loads a raw preview of the data and displays the available sheets (Excel only) and columns within the data file. Our sample Excel file consists of a single sheet called “ImageCopyrights” that includes the previously shown data the we want to stamp onto our pictures. Afterwards I’m confirming my data source settings and we are nearly finished with our tutorial.

The only thing missing is the Expression that defines how the text of the watermark is getting composed. Therefore we are typing the following Expression into the Editor:

Our dynamic Data Expression for getting the Excel data into the watermark
Our dynamic Data Expression for getting the Excel data into the watermark

As keen bulkWaterMark tutorial (and online help!) reader you likely know what this text above means. But for the sake of completeness I would like to explain what those brackets and cryptic names are for:

The text till “Photo by ” is not an Expression – this will be written into the watermark directly. The interesting part starts when the first bracket “{” sets in and the magic begins: The function “GetColumnValue” of the “Data” context gets called. This function requires to parameters:

The first parameter (green) expects the name of the column that contains the image filename. This column gets searched for the the filename and is column A called “Filename” in our Excel file.

The second parameter (blue) is the value, that we are searching within column “Filename”. We are putting another, nested Expression result as parameter: {OriginalImage.FileName} returns the filename of the current image we are going to watermark.

Parameter #3 (orange) defines the column we want to actually use in our text watermark. The data for the text watermark should be taken from column C “Photographer”.

This is how it looks like in bulkWaterMark:

Add text to pictures from Excel
Composing the data with the Data Expression

And this is how a watermarked photo looks like:

Add text to pictures from Excel sample
Done! Mission “add dynamic data into pictures” accomplished

In our new Expression Editor you can also set test parameters for testing dynamic expressions easily by switching to the tab “Test Parameter” and adding a few image files. You can now select any of the added test images by a single click and depending on the selection, bulkWaterMark sets the property {OriginalImage.FileName} to the chosen image filename.

Testing the Data Expression with a test image
Testing the Data Expression with a test image

Conclusion

The new Expression Editor and Data Expression feature improve the handling of dynamic text watermarks a lot. Data Expressions might look complicated on the first sight, but after a few tries you will quickly batch watermark thousands of photos with external and individual data in no time. I think the effort already pays off when you want to watermark a few dozens of images with dynamic data.

If you need help with integrating your Excel or CSV data in your watermark profile do not hesitate to contact our support or just post above this article. Our presented example is included in our samples library that comes with a fresh bulkWaterMark installation.

Cheers,

Phil

Old vs. New or PMlabs waterMark V2 vs. PMlabs bulkWaterMark

You are using PMlabs waterMark V2 already, so why should you switch to the brand new and commercial PMlabs bulkWaterMark?

bulkWaterMark App Icon

Since the release of waterMark V2, not only technology behind the software has changed, also my programming skills. waterMark V1 was first released in 2003, V2 followed 2005 and waterMark V3 aka bulkWaterMark has seen the light in late 2015. So what does bulkWaterMark batch watermarking photos better than its predecessors? Let’s take a look… 🙂

1. Better user experience for your daily image protection routine

We thought a lot about how to improve the user experience of waterMark V2. Like V1, the V2 had a similar interface for configuring the batch watermarking. Opening or defining the watermark and its position, setting an output format and folder, adding files to the batch run and finally hit the button to start watermarking your photos. Simple, but somehow not really self-explanatory.

Configuring a batch watermarking run with waterMark V2
Configuring a batch watermarking run with waterMark V2

I have often heard that people were overwhelmed when seeing waterMark V2 the first time in all its glory. For me as developer of the software, the workflow was clear, but for users not. Therefore, we redesigned the UI mechanics of bulkWaterMark for configuring the batch watermarking of photos.

bulkWaterMark Wizard Start View in Windows 10
bulkWaterMark Wizard Start View in Windows 10

bulkWaterMark welcomes you with a start view that lists all recently used watermarks. To use one of these watermarks to batch watermarking your photos, just double-click them. If you want to create a new watermark, double-click the first entry and the profile editor opens. By double-clicking the second entry of the list, you can open a watermark that is not in your list yet or has been saved on a different computer.

Dragging photos to protect from Explorer to bulkWaterMark
Dragging photos to protect from Explorer to bulkWaterMark

Afterwards the photo batch list view awaits your pictures to be dragged into the list. Just drag the image files or folders you would like to get watermarked from the Windows Explorer and drop them onto bulkWaterMark’s batch list. As soon as bulkWaterMark has some files to play with, you can check if the watermark looks good on the images without modifying the original files. Simply click a photo to get a preview. If everything is looking alright, then start the fast bulk watermarking by clicking the drop button. The app asks you politely where to save the protected files and tries to match the output file format with the input file type. Otherwise you can follow the wizard to change output settings like target folder, resizing, renaming and image format converting.

We know that this is probably the most significant UX change since waterMark V2 and also a few people have already told us that they are missing the old Explorer-style folder tree view and file list to browse within the application directly. Most users however, really like the drag and drop approach we are using here, since the user interface is more structured and less crowded now. The output settings are now optional for display, because once you have setup your profile, you will probably never ever need to change the output settings again. So your future workflow for watermarking pictures with bulkWaterMark is only consisting of three tasks anymore: Choose your profile, drag and drop your photos and click the drop! 🙂

2. Overhauled profile editor to design fresh and dynamic watermarks 

While waterMark V2 already allowed to create watermarks in WYSIWYG (What You See Is What You Get) style with layers like Photoshop, its profile editor had some limitations. Some examples: Layer rotation was not possible in V2 and if you wanted to add a new text watermark to your images, a new window appeared where you can edit the layer’s display text.

The old waterMark V2 profile editor
The old waterMark V2 profile editor

In bulkWaterMark you can now type directly your text layers and rotate or resize them via mouse. If you are accidentally deleting a layer, bulkWaterMark will fix that by offering you an undo of the fatal action. This and a lot of other features can now be controlled more smooth and natural as you would expect it from an image editing software. Tiny tweaks like previews of each available font (you can set for your text watermark when selecting the font family) are making the user experience perfect. Besides these UI improvements, there are also a ton of real new watermarking-relevant features that can be enabled within the new profile editor.

The brand new profile editor of bulkWaterMark
The brand new profile editor of bulkWaterMark

The bulkWaterMark screenshot above shows some of the new features: For example, you can see the new gradient color brush that is available for all layer color selections in your watermark. In the watermark above I used the colors red, crimson and gold to compose the gradient.

Also, the text layer of the watermark is rotated – a new feature for layers and layer groups in bulkWaterMark. Wait, layer groups? Yep, that’s also new. Layer groups are surprisingly a group of layers and stand for a watermark. So you now can apply multiple watermarks on a photo by defining multiple layer groups in bulkWaterMark’s watermark editor.

A text watermark with a gradient brush, a white stroke and light drop shadow
A text watermark with a gradient brush, a white stroke and light drop shadow

Another one: Blending effects. You can now have a soft drop shadow below your text or a thick stroke that surrounds each character. These effects can be combined and used for any type of layers, like image watermarks too.

Some blending effects applied on a text watermark
Some blending effect combinations applied on a text watermark

Also neat: Live preview your watermark while editing it. Just drag and drop an image file onto the preview of the profile editor and the picture gets previewed with the watermarks that are on your canvas.

Watermark preview with the new bulkWaterMark profile editor
Watermark preview with the new bulkWaterMark profile editor

Within the live preview, you can toggle the watermark position for each layer group and stamp a watermark multiple times in a picture in bulkWaterMark. And of course, we also added the often requested tile watermark mode to bulkWaterMark:

Finally! Tile watermarks in a PMlabs waterMark :)
Finally! Tile watermarks in a PMlabs waterMark 🙂

So you see: Upgrading to bulkWaterMark is already worth it! 😉 But wait for another few reasons… 🙂

3. Extendability!

bulkWaterMark is extendible by using PlugIns. In the next few month we will ship free PlugIns to provide more options for creating new watermarks, developing your own custom expressions for text watermarks or including new image formats for import and export. A social export PlugIn is also in the pipeline to support watermarked image upload for Facebook, Flickr and WordPress.

We will also release our PlugIn SDK as mentioned a few weeks ago. In the meantime we are fine tuning and optimizing all the interfaces and setting up the documentation.

4. New batch resizing and renaming options 

For bulkWaterMark we also did some fine tuning regarding resizing and renaming options. For resizing we added the possibility to set the resolution of the file in dpi and also implemented two flags to avoid enlarging smaller images or shrink bigger images. This is useful if you have a lot of high resolution photos in your batch list that need to be sized down to 800 x 600 pixels, mixed with some small pictures that are only at 640 x 600 for example. bulkWaterMark will watermark the small pictures too then, but will not resize them to 800 x 600 pixels, because the original size is smaller.

Resizing with more options in bulkWaterMark
Resizing with more options in bulkWaterMark

Also renaming is now more clever than in waterMark V2: You can now dynamically build a renaming pattern in bulkWaterMark with properties from the input file like the original filename or output size:

Renaming output filenames with variables
Renaming output filenames with variables

In the screenshot above I am defining the renaming pattern “resized_$Wx$H_###”. When using typical photo taken by a digital camera or smartphone, the filename is probably something like “DSC_1232.jpg”. If this is the fifth image in your batch list and the image is 2500 x 1667 pixels, then this will result in the output filename “resized_2500x1667_005.jpg”.

5. Dynamic Expressions reloaded

bulkWaterMark brings also major improvements for users of expressions. Expressions can be used in text watermarks to display input or output image metadata. While waterMark V2 had just a simple find and replace mechanism to detect variables and replace them with metadata, bulkWaterMark parses and analyzes a text watermark’s content and offers completely new possibilities by parameterizing expressions, nesting their results or using logical conditions to control their output. And: Expressions can also be used in other watermark types. In image watermarks you can specify the image filename by using an expression. The following example shows how to use an image to illustrate that the watermarked picture was shot with flash:

Improved expressions with bulkWaterMark
Improved expressions with bulkWaterMark

When using the above expression and your input photo was shot with an Exif-capable camera, bulkWaterMark reads the Exif tag Flash first. If the value of the tag does not equal 0, the photo was shot by using a flash. In this case the expression returns the string “flash.png”. bulkWaterMark uses this resolved value as image watermark filename and stamps it into the photo, but only if the Exif tag is not 0:

Using expressions to render a conditional image watermark
Using expressions to render a conditional image watermark

Expression features are fully available in every version of bulkWaterMark, including PlugIn support. More in-depth details on the topic expressions will follow in the next few weeks in our blog!

6. Auto-scalable vectorized watermarks

Another important new feature of bulkWaterMark is auto-scaling watermarks according to the input image size. Sometimes you have different image sizes to watermark within a single batch run and want to display a watermark always in the center of the photo for example. With bulkWaterMark, this is no problem anymore:

Yay! A text watermark that is sized 90% of the canvas = 90% of the image to stamp
Yay! A text watermark that is sized 90% of the canvas = 90% of the image to stamp

As you can see, bulkWaterMark always scales the text watermark that it measures 90 percent of the photo to watermark. This feature works best when centering watermarks horizontal. It guarantees high-res watermarks on high-res photos:

"Yay" applied on a high-res photo
“Yay” applied on a high-res photo

You also can apply it on normal photos. bulkWaterMark chooses the right font size according to the image size automatically:

The same vectorized text watermark on a smaller image
The same vectorized text watermark on a smaller image

Conclusion

So you have seen that bulkWaterMark does indeed rock more than waterMark V2. It’s a lot more, also compared to paid alternatives. We hope you are enjoying the new features and tools that are packed with bulkWaterMark for protecting your photos with watermarks. Please keep in mind, that we still have a lot of ideas for future releases and PlugIns for 2016.

Stay tuned and watch out for a more detailed write-up about our new dynamic expressions in bulkWaterMark!

Happy holidays!

Phil

Can you extend your watermark with PlugIns?

Although bulkWaterMark is a fresh app for batch watermarking your photos, we have already gotten a dozen of requests how you can code PlugIns for it, since it has a tab called “PlugIns” in its settings dialog.

The good news: Yes, there will be full PlugIn support for new layer types, expressions or input image format readers and output image format writers. Just like in Photoshop, that also supports a lot of modding and extension interfaces. In the future we will also offer the possibility to create custom blending effects too. We hope that the PlugIn SDK will we be a success and will attract developers.

And the bad: Currently we do not have any documentation for our PMlabs GrfX PlugIn interface. The software development kit is not ready yet and will probably modified in the next few releases.

Although we have not officially announced the PlugIn SDK yet and bulkWaterMark is already out, a dear user barnacleboy already made an expressions PlugIn and posted a template with instructions on Github. Thanks for that! 🙂