Text to ImageText to Image
Home > Books > Tutorials and Training Guides > Image Processing > Text to Image

Rate this page:
Really useful
Satisfactory
Not helpful
Confusing
Incorrect
Unsure
Extra comments:


Text To Image Tutorial

This tutorial describes how to directly create a PNG image from a text resource.

Step 1

The first and only step is to directly create a PNG image representation from a text resource using the imageText2PNG service.

Code Result
<instr>
  <type>imageText2PNG</type>
  <operand>
    <text>Text for the Image</text>
  </operand>
  <operator>
    <text2PNG>
      <fontface>Serif</fontface>
      <fontsize>30</fontsize>
      <color>888844</color>
      <bgcolor>FFFFFF</bgcolor>
    </text2PNG>
  </operator>
  <target>this:response</target>
</instr>

This instruction creates an PNG representation from an XML formatted text resource. In this example the text is statically defined within the DPML program. A more useful vesion would issue a sub-request for a resource that contains the text.

Summary

This illustrates how simple it is to create a PNG representation with the Image resource model.

© 2003-2007, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.