Technical Helpweb

Dialogic® PowerMedia™ Extended Media Server (PowerMedia XMS) - more articles

An Offline Utility for PowerMedia XMS Dynamic Image and Menu Generation


In RESTful mode, Dialogic® PowerMedia™ Extended Media Server (XMS) uses the ImageMagick libraries to enable images and captions to be created dynamically by the application. This can simplify the task of building menus as it relieves the application developer from having to create every image in advance and having to maintain these as the application evolves.

While this feature can be very convenient, developing new formats for these images generally requires some amount of trial and error in getting the text properly placed and sized and colors/background images adjusted. Being able do this in an offline, batch mode should greatly speed up this process, as restarting the PowerMedia XMS services must be done after making adjustments. The "Imaker" utility uses the same config files, templates and style files as PowerMedia XMS. Running the utility on a command line will reference these files and produce a JPEG image that can then be viewed with any common photo (JPEG) viewer.  When the desired results are obtained, the files can be moved into the proper places on the PowerMedia XMS system and used as part of a RESTful application.

A full description of PowerMedia XMS dynamic Image and Menu Generation will not be given here. Rather, refer to section 8 in the Dialogic® PowerMedia™ Extended Media Server (XMS) RESTful API Developer's Guide for full information.

Imaker can be used to produce files at the following resolutions:

  • CIF - 352x288
  • VGA - 640x480
  • 720p - 1280x720

There are examples included that use all 3 resolutions.

Installing and Running Imaker

Imaker is contained in the tar file that can be downloaded here. Untar the file with "tar -xvfz imaker.tgz". Executable and source are contained in the Imaker directory.

 Running on CentOS 6.0, Imaker requires the following packages:

  • ImageMagick-
  • ImageMagick-c++-

which can be installed using the "yum" utility:

> yum install ImageMagick-
> yum install ImageMagick-c++-

Run the Imaker utility with the following command line arguments:

> Imaker <template_and_text> <output_file.jpeg> <image_width> <image_height>

A simple shell script, "", contain examples of imaker runs that were used to create the demo menus for the XMS RESTful verification demo and the MSML demo that are shipped as part of PowerMedia XMS.

The resulting JPEG image can be directly played in XMS RESTful mode.  For example:

      <play max_time="10s">
         <play_source location="file://verification/greeting.jpeg"/>

will continually broadcast the JPEG image greeting.jpeg. If the URL is given as "file://verification/greeting" and greeting.vid is not available, the image and any associated audio file (.wav) will be played for 10 seconds.

If a max_time is not specified, the play will remain in effect until a RESTful "stop" command is issued:

      <stop transaction_id=<play_transaction_id>"/>

For use in MSML mode, the image must be further processed with a video editor, and then converted to a PowerMedia XMS video format.  Most editors allow a static image to be used and displayed for some predetermined number of seconds. The resulting video can then be saved and processed into the .vid format that PowerMedia XMS uses, much like any other video clip.

Building Imaker

If modifications to the utility are desired, the source code is included. The following additional yum-installed packages are needed to build it:

  • ImageMagick-devel-
  • ImageMagick-c++-devel-

There is a simple Linux shell script called "build" included that will compile the source modules and create the executable.

Files for Dynamic Menu and Image Generation

Click here to download a tar file of the scripts and files mentioned in this article.


The following are links to all of the major components used in this article:

Dialogic® PowerMedia™ Extended Media Server (XMS)  –

Image Magick -

Open Source

This article discusses one or more open source products, systems and/or releases. Dialogic is not responsible for your decision to use open source in connection with Dialogic products (including without limitation those referred to herein), nor is Dialogic responsible for any present or future effects such usage might have, including without limitation effects on your products, your business, or your intellectual property rights.


Please rate the usefulness of this page:  
0 - not useful at all
1 - potentially useful
2 - quite useful
3 - very useful
4 - exactly the information I needed     

Please enter a comment about this page:

First published: 12-Nov-2012
Open access: Product rule: open; Page rule: Auto