Lolcats your UCM Conversion Server

For those using UCM to store images and rendition them using the Digital Asset Management module, it may be useful to add watermarks to those images. Watermarks could be other images such as a corporate logo or text that's applied to the image.

The default 3rd party conversion utility that the DAM Converter is configured for is Image Alchemy from Handmade Software Inc.. While it has a large range of file format support, it does not have the ability to watermark. But DAM Converter can be configured to use ImageMagick instead, which does have watermarking.

To show an example, I thought the Lolcats would be perfect. If you haven't been on the internet for the past two years, you can check out the phenomenon over at I Can Has Cheezburger.

First, go to the Configuration Manager applet and add a new option list entry to the PackagedConversions metadata field called 'LOLCats'. Then go on to the server for Conversion Server and browse to the \custom\DAMConverter\resources\ folder. The Digital Asset Manager Installation and Administration guide walks you through modifying the extraRendition_definitions.hda file in the \data\configuration\dam\ directory, but I've never had much luck with getting that work. Instead, I've defined them directly in the damconverter_basedefinitions.hda file. But I make sure to always make a backup in case I update the DAMConverter component and the changes are overwritten.

So in the .hda file, in the ResultSet ImageManager_TablesLoad section I add my new entries for the new rendition set just above the @end line:


Then in ImageManager_NameValues section, I first add my entries for the ImageMagick executable right under the ones for Image Alchemy:


Then before @end line for that same section, I add the ImageMagick command-line conversion options:

-resize 80x80>
-resize 250x250>
-resize 800x600>
-resize 80x120>
-resize 400x300> -font impact -weight bold -pointsize 32 -draw

So in this example, I'm creating the first 3 standard renditions of Thumbnail, Preview, and Web. Then I have one for logos which will keep the image under 80 pixels wide and 120 pixels high. And the last one is for the text watermark. I define the size of the image to be a max of 400x300 and set the font style, weight, and size. Then I issue the -draw command which will print out the value that is defined next. But i do not define that on the same line. And you'll see why down below. For more details on ImageMagick options, see their website.

Finally, I create the actual rendition set ResultSet for the LOLCats:

@ResultSet ImageManager_LOLCats
<$Imagemagick_Watermark$> "gravity northwest fill white text 10,12 '<$dDocTitle$>'" "<$inFile$>" "<$outFile$>.jpg"
A 72 dpi JPEG no wider than 400 pixels and no higher than 300 pixels
<$Imagemagick_Thumbnail$> "<$inFile$>" "<$outFile$>.jpg"
A 72 dpi JPEG no wider or higher than 80 pixels
<$Imagemagick_Preview$> "<$inFile$>" "<$outFile$>.jpg"
A 72 dpi JPEG no wider or higher than 250 pixels

The key line is where the Imagemagick_Watermark variable is used. This issues the command-line options mentioned above. And then immediately after that I specify the text to draw and its location in the image. In this case, rather then hard-coding the text to display, I pass it the Title that was given to the image when checked in. In order to process the Idoc Script, it needs to be on this line and not the command-line definition above. Unfortunately, not all metadata is passed. But another useful example might be to watermark the Content ID to help tag and identify the image. Now I just save the file and restart the Inbound Refinery.

On the check-in page, I specify my Title and file:


And specify the new Image Rendition Set:


After check-in, I now have this image as my result:


Update 12/29/2009: The command-line entries I had between the command-line definitions and rendition resultsets did match. One had a capital 'M' in the 'ImageMagick_Thumbnail' and the other had 'Imagemagick_Thumbnail'. Both have matching case now. Hat tip to Jason for pointing it out.


Correction on 10/6/2009: Forgot to add the '>' greater-than symbol after the -resize values. This will resize the image to within those parameters IF the image is larger. Without it, the images will always resize.

Posted by Kyle Hatlestad on October 06, 2009 at 06:51 AM CDT #

Ha, that there is awesome. I set up a DAM for our UCM implementation a year or so ago now part of this involved me swapping over to imageMagik (the business wanted watermarks, but never ended up using them) Anywhoo, during the testing I uploaded a whole bunch of 'lolcat' images! Many are still on our dev server. It's now a running theme for any image based testing/work I do here, there is always cats or "Can you test this please, but no cat pics" :D

Posted by Tyro on October 13, 2009 at 04:56 PM CDT #

Hi Kyle, thanks a lot for the post. It helped me a lot. I checked in an image and the image renditions were created. I am designing a placeholder and wanted to use one of the rendition images. But how can i insert that image into my contribution region using the ephox editor? UCM strangely doesnt treat the rendition images as general images and hence they are not indexed i guess. So the individual rendition images has to be first downloaded and then manually checked in to be used on a website. Instead they should have been checked in as contents directly after they are received from image alchemy. :-( Anyways, if you know a better way or if i am missing some details plz lemme know. Thanks again Kyle for your inputs. Regards john

Posted by John George on October 22, 2009 at 08:58 AM CDT #

Hey John,
Right now, we're only exposing the Web version of the renditions out through Site Studio sites. The main reason for that is when UCM stores the additional renditions for images, they are actually stored together in a zip file in the weblayout. So when you make a request for a specific rendition, it's a service call to extract the file and serve it up. So this can add a lot of overhead if you are serving a lot of images this way.
If you install the very latest DigitalAssetManager component from the Inbound Refinery patch (#6865669), you'll notice that it actually adds new Select buttons next to each rendition. From what I've seen though, it appears they only add the path to the Web rendition. But I believe the intention is that eventually image renditions will become available as static files that can be pulled directly from the web server and not involve a service call.
Thanks - Kyle

Posted by kyle.hatlestad on October 26, 2009 at 03:35 AM CDT #

Top Class Kyle. So far I'm doing this using z-index=-1 in WCM. I'll look into this caption alternative.

Posted by Guillaume on November 25, 2009 at 03:32 PM CST #

I am using ECM11g (ImageMagick is installed). I am unclear what you mean by "First, go to the Configuration Manager applet and add a new option list entry to the PackagedConversions metadata field called 'LOLCats'."

Posted by Mark Zawadzki on March 21, 2011 at 06:12 AM CDT #

Hello Mark, Configuration Manager is one of the administration applets. You must be an administrator of UCM in order to make this change. The applet is available by going to Administration -> Admin Applets. Launch Configuration Manager and on the Information Fields tab, highlight the 'PackagedConversions' metadata field. You can then click 'Edit values...' and add the new option list entry. Thanks, -Kyle

Posted by kyle.hatlestad on March 22, 2011 at 11:32 PM CDT #

Hi Kyle, I'm using IBR 11g and was not able to get this work. I didn't see a ImageManger_NameValues section in the damconverter_basedefinitions.hda so I added it along with the other information above. After adding this IBR wouldn't deploy correctly. I received an error about not being able to parce imname. So my question is does the above information hold true for 11g? Am I missing something or doing something incorrectly? Thanks, Shelley

Posted by Shelley Johnson on June 03, 2011 at 02:30 AM CDT #

Hey Shelley, Yes, in 11g because the Outside In converters are now rolled into the core DAM component, you need a separate component for any 3rd party integrations. It's available on OTN at With 11g, it now also supports nConvert which I've found a bit easier to install and work with then Image Magick. The component includes a readme the describes how to configure it which will similar to my post above. Thanks, -Kyle

Posted by Kyle Hatlestad on June 03, 2011 at 02:40 AM CDT #

Thanks Kyle! Worked like a charm :-)

Posted by Shelley Johnson on June 03, 2011 at 08:36 AM CDT #

Any chance you can do a tutorial on getting nConvert to work on 11g?

Posted by Bryan on January 18, 2012 at 01:44 AM CST #

Hey Bryan,

Take a look at a new posting I did on the subject:


Posted by Kyle Hatlestad on January 19, 2012 at 08:37 AM CST #

Post a Comment:
  • HTML Syntax: NOT allowed

Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: ateam_webcenter/


« July 2016