Entity
X-Factor Industries Synthetic Existence
|
Posted - 2010.06.25 14:20:00 -
[1]
Repost due to original thread expiring. The new version has been available for a while but I couldn't bump the thread and moderator unlock didn't work for some reason
I've made a player corporation logo generator for python.
You can find the module here: http://github.com/ntt/evelogo
(Note: it requires Python Imaging Library)
The module requires preprocessed corp logo layer images, which you can find here: Tyrannis Corp Logo Pack (7z archive, 74MB) You can place the corplogos folder anywhere you want. If you place it in your project's work folder, it will work without having to set the resourcePath in your code (see below).
The module is compatible with my eveapi module, though can be used without it. If python isn't you cup of tea, it should be easy to port to your language and image toolkit of choice as it's a pretty simple process to render the logos. If you are looking for a Ruby version, I recommend getting Ix Forres' version here: Ruby logo generator.
Example usage: import eveapi import evelogo
evelogo.resourcePath = "wherever/you/put/corplogos/"
YOUR_USERID = 123 YOUR_APIKEY = "bla bla bla"
# Generate logos directly from parameters: logo = evelogo.CorporationLogo([[539, 520, 461], [672, 675, 672]]) logo.save("xfi1.png")
# Generate large opaque logo image with blue background: logo = evelogo.CorporationLogo([[539, 520, 461], [672, 675, 672]], size=96, transparent=False, bgcolor=(33,133,233)) logo.save("xfi2.png")
# Or use the eveapi module! api = eveapi.EVEAPIConnection() corpsheet = api.corp.CorporationSheet(userID=YOUR_USERID, apiKey=YOUR_APIKEY, corporationID=219220371) logo = evelogo.CorporationLogo(corpsheet.logo) logo.save("xfi3.png")
This produces images looking like this: (which just so happens to be my corp logo! )
Hope it's useful to someone :)
#----------------------------------------------------------------------------- # Version: 1.1.0 (23 May 2010) # - Now uses (and requires) the large size logos added in Tyrannis. # #----------------------------------------------------------------------------- # Version: 1.0.1 (08 December 2008) # - Fixed logos breaking that have only 1 or 2 shapes defined (Arkady)
Thanks to: Chribba, for EVE-Files. CCP, for allowing the use of their logo images.
_
Got Item? | EVE API? | Cache? |