Commons:Ancient Chinese characters:Tutorial

From Wikimedia Commons, the free media repository
Jump to: navigation, search

This is the Commons:Ancient Chinese characters project's tutorial for creating SVG scalable images from orginary gif files for the project.

Selecting the source images[edit]

  1. Choose a Chinese character, Japanese Kanji or Korean Hanja that has not been converted to SVG before or which might be done somewhat better.
  2. Pick up one or even all of the images for the styles seal, bigseal, bronze and oracle:
  3. Find data and pictures of the character in question at InternationalScientific (Richard Sears allowed use of his data[1])
  4. Select the to you most interesting picture of a given category and download it to your computer.
    • For each style, save the selected gif image on you computer. To distinguish between them you may follow this naming convention:
    • seal => *-seal.gif
    • bigseal => *-bigseal.gif
    • bronze => *-bronze.gif
    • oracle => *-oracle.gif

Please keep the code name of the images, i.e. "J12333" in J1233.gif, this will be needed later.

Conversion from gif to SVG format[edit]

Conversion using Inkscape[edit]

Follow these steps to convert the gif image to SVG, e.g. *-seal.gif to *-seal.svg. For more information, please see the detailed picture guide below.

  1. Paste the gif image file into Inkscape and set the page size to 300px × 300px.
  2. Scale the gif image to 300px in height, uniformly, that is preserving its original proportions.
  3. Select > Path -> Trace Bitmap from the tool bar (Shortcut: Shift + Alt + B)
  4. Run a Single Scan either with Brightness cutoff = 0.950 or Color quantization = 2
  5. Retouch the path to make up for the gif file's low quality and correct obvious mistakes
  6. Enlarge the SVG path so that it has a height of 270px, again uniformly to preserve the original proportions.
  7. Center the SVG image relative to the page by selecting > Object -> Align and Distribute from the tool bar (Shortcut Shift + Ctrl + A). Do this vertically and horizontally.
  8. If everything went well, then you can delete the underlying gif image which is still there under the path.
  9. Save your file according to the naming convention, e.g. *-seal.svg, where * is the character you looked for in step 1.

Conversion using potrace[edit]

Inkscape is not the only program allowing to convert raster images to vectorial images. Another program which gives good results is 'potrace'. 'potrace' can convert 'bmp' images to SVG and is scriptable under Linux. So you could convert the GIF to BMP using ImageMagick convert and then the BMP to SVG using 'potrace'.

A sample Shell script taking the base GIF file name as argument follows:

convert $1.gif $1.bmp
potrace -s $1.bmp

The Linux tutorial describes how to automate the task of generating centered SVG files from the GIFs.

Upload to Wikimedia Commons[edit]

Upload the converted gif file to Wikimedia Commons and use the ACClicense-Template as follows:

{{ACClicense|<your selected character>|<type of character>|<category of character>|<original code name of gif file>}}

The selected character is the one you found your gif file under at Richard Sears' InternationalScientific. The category and type of character will usually be the same and are the source image's style: seal, bigseal, bronze, or oracle. The original code name is the original name of the gif file minus the ".gif" at the end which was mentioned above.

You do not have to type anything else while uploading your picture as the license and description are automatically added by using this template!

The HTML form to be used is the basic form, which allows to enter the template above in the "Summary" field.

For the character used in the tutorial this would be:

{{ACClicense|木|oracle|oracle|j14138}} because this character was found by searching InternationalScientific for "木" and then using the oracle style picture provided there. The j14138 was the original file name of that picture, j14138.gif.

Note: {{ACClicense|木|oracle|oracle|j14138||075}} would be correct, because 木 shows the traditional Chinese radical 75. -- sarang사랑 12:08, 15 January 2010 (UTC)

Detailed picture guide[edit]

Steps described using Inkscape

Please see this tutorial or click on the thumbnail on the left side for a detailed step-by-step tutorial on how the conversion is done.

Creating SVG files is really important since SVG is scalable, while gif is not. Converting these images to SVG is really easy even with no experience in image manipulation, and Wikimedia benefits greatly from your work. Thank you for your contribution.

After the usual learning curve (about five characters), it will usually take from three to five minutes to convert a single character with shape improvements. Of course complex characters may need a little more attention and simple ones (like the one in the example image above) may need a little less attention.


  1. Richard Sears' Agreement