flesh-incubus
flesh-incubus
flesh-incubus
flesh-incubus
Aerobush Entertainment

Application #4 - Screenshot Translator

First Previous Next Today

AerobushScreenshotTranslator.zip

Aerobush Screenshot Translator
Version: 1.36
Creator: Aaron Light

Please feel free to redistribute this, as long as you preserve the readme. If you create font sets for other games, please let me know.

How to use:
The program will automatically poll the system's clipboard to see if it changes. If there is a change, it will automatically scan for blobs, attempt to match them to the font sets, spit out the Japanese text, and pass it through the Google Translate API. Afterwards, the user can edit and retranslate the text to their heart's content. In other words, hit Alt+PrintScreen while playing your favorite game and this program will attempt to translate the current screen for you.

To create your own font set, you need a gif file and a text file. The gif file should contain all the images of characters in the set as one single color, each character+whitespace should take up the same width and height, and the background should be set to transparent. Also, a prefix with an underscore after it indicates the general font style (for instance, bold). This makes it easy to have several different styles that map to a single text file. The text file should contain all of the characters in the same order as they are in the images, and the filename of the text file should never have a prefix.

One extra note about the fonts: I treat punctuation a bit special, since a lot of punctuation tends to be composed of a small number of pixels. Therefore, I only look for punctuation if it's on the same line as regular text. So it's important to separate that out. Also, the first character in the punctuation file is considered to be the "stop" character, and in my sample files you can see that I chose the Japanese period. This is for separating out text where the font style changes or context changes (such as menu selections).

Right now, the fonts are perfectly capable of matching up to most of the text in Irozuki Tingle No Koi No Balloon Trip. I focused on this game because I loved the first Tingle adventure game and I don't know if this one will ever be translated. I haven't found any other games that use the same fonts yet, but if you know of any that work please let me know and I'll add them to the compatibility list.

Features:
- Uses the Google Translate API, courtesy of http://code.google.com/p/google-api-translate-java/
- Support for multiple languages. Your choices are saved from session to session.

Latest changes:
- Added new fonts
- Fixed minor spacing problems
- Added a way to set the minimum number of pixels per character

To do:
- Format the text into subframes. Sometimes, games put two paragraphs side-by-side, and the current code wouldn't treat the two as distinct blocks of text. This shouldn't take too long to implement.

- Harder, Better, Faster, Stronger. I think my code is as fast as it can get in parts, but there's always room for improvement. I would really like to make larger screenshots doable without having to allocate a large amount of memory, but the amount of memory required to hold all the blobs in an average 1920x1200 image approaches 1024 megabytes. If you would like to parse huge screenshots for whatever reason, you can run: javaw -Xms1024m -Xmx1024m -jar AerobushScreenshotTranslator.jar

- Support different text flows. Currently, the program assumes that the text in the image flows from left to right and then top to bottom. This is seems to be the case with most console games, so unless someone specifically requests this feature I probably won't implement it. It would require a lot of code tweaking.

- Unless anyone has some good suggestions, I'm abandoning doing fuzzy OCR. The few fonts I grabbed from *one game* vary incredibly much, to the point where they aren't easy to match up with the original Japanese characters even by careful human analysis.

Compatibility List:
Irozuki Tingle No Koi No Balloon Trip

First Previous Next Today

Permalink

Everything on this site is © Aerobush Entertainment unless otherwise indicated.