summaryrefslogtreecommitdiffstats
path: root/tools/image_generator (follow)
Commit message (Collapse)AuthorAgeFilesLines
* image_generator: Fix the warnings on import order.Tao Bao2018-11-061-13/+11
| | | | | | | | | | [platform/bootable/recovery] tools/image_generator/ImageGenerator.java:36: Wrong order for java.util.StringTokenizer import. Use Ctrl+Shift+O (Eclipse) or Ctrl+Alt+O (Intellij) to sort imports. https://source.android.com/setup/code-style#order-import-statementsERRORS: [platform/bootable/recovery] tools/image_generator/ImageGenerator.java:43: Wrong order for org.apache.commons.cli.CommandLine import. Use Ctrl+Shift+O (Eclipse) or Ctrl+Alt+O (Intellij) to sort imports. https://source.android.com/setup/code-style#order-import-statementsERRORS: [platform/bootable/recovery] tools/image_generator/ImageGenerator.java:50: Extra separation in import group before 'org.w3c.dom.Document' Test: `mmma -j bootable/recovery` Test: `repo upload` no longer gives warnings. Change-Id: If24c6b7ca33b9223b3e326a48885c24c35b5fa68
* Make the text image readable under recoveryTianjie Xu2018-11-011-14/+123
| | | | | | | | | | | | Encode the width, height and locale of the localized image as pixels so that recovery can locate the correct range of the image from a concatenated png file. Also address a few todoes including wrapping the CJK text, making a catch-all type for all languages. Test: view the generated image under locale test Change-Id: Icd3997eb4e992e76ef72526787d64c406f606970
* Switch to use commandline parserTianjie Xu2018-10-293-15/+72
| | | | | | | | | The commandline parser adds some flexibility to the argument parsing. It also makes the help message more descriptive. Bug: 74397117 Test: generate a image, checks the help message Change-Id: Ib238658a9a6fa8806f1b0dde419c8fb970e7cb37
* Use a host java program to generate the background textTianjie Xu2018-10-134-0/+438
This program uses java.awt.Graphics2D to generate the background text files used under recovery mode. And thus we don't need to do the manual work by running emulators with different dpi. The program takes the following parameters: 1. imageWidth: The number of pixels per line; and the text strings will be wrapped accordingly. 2. textName: The description of the text string, e.g. "recovery_erasing", "recovery_installing_security" 3. fontDirectory: The directory that contains all the support .ttf | .ttc files, e.g. $OUT/system/fonts/ 4. resourceDirectory: The resource directory that contains all the translated strings in xml format, e.g. bootable/recovery/tools/recovery_l10n/res/ 5. outputFilename: Path to the generated image. Bug: 74397117 Test: checks the generated png files Change-Id: Ia5506a0a4f5da1ebfd7090345eb246f44b265075