Localize Image


Localize Image
I was faced with a problem with one of my many hobby projects: How to localize text on an image? The answer was for me to make a small tool that i could use to do the task for me. Once you have created your base image you then just create a text file (with xml formating) that describes what text, font, size, and where to put the text on the image. The tool then gathers the information and put's the text on the image, and then it can save the localized image to a new file.

How do i use it?
Step 1: As i said i first create a base image like this one for eksample:


Step 2: Then i create a project file that describes what text i want, where i want it, and the font i want it written with. As an eksample i could create a file containing the folowing.
<?xml version="1.0" encoding="utf-8"?>
<Layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Output>Output.png</Output>
  <Image>Input.png</Image>
  <Data>
    <Setup>
      <Text>Text On</Text>
      <Location>
        <Point>
          <X>40</X>
          <Y>5</Y>
        </Point>
      </Location>
      <Style>Regular</Style>
      <Font>Snap ITC</Font>
      <Size>35</Size>
      <Angle>0</Angle>
    </Setup>
    <Setup>
      <Text>Image</Text>
      <Location>
        <Point>
          <X>60</X>
          <Y>45</Y>
        </Point>
      </Location>
      <Style>Regular</Style>
      <Font>Snap ITC</Font>
      <Size>35</Size>
      <Angle>0</Angle>
    </Setup>
  </Data>
</Layout>
The sample file can be downloaded by right clicking and saving THIS FILE


Step 3: Then i use the "LocalizeImage" tool and open the project file, this will show a small thumbnail in the upper left corner of the base file, and a larger preview of the result in the right side.

The screen should look something like this.

Step 4: Click the "Save" button, and the program saves the result into a new file (The name was specified in the project file, in the Output tag). This file contains the text's specified drawn whit the requested fonts.


The result
The resulting file from the above eksample looks lige this.



The program is protected by Copyrights, but may be downloaded free of charge for non-commercial usage.
The complete program and source code in C# and can be downloaded here.
DOWNLOAD

For full commercial usage pay 25$ USD, and save the receipt.