Giter VIP home page Giter VIP logo

guild-emblem-generator's Introduction

Build status Dependencies Status devDependencies Status

Standard-Js GitHub license

Guild-Emblem-Generator

The Guild-Emblem-Generator is a tool written in Node.js to convert emblem and guild objects obtained via the Battle.net API into actual images. You can convert the object into a buffer or a Canvas.

Usage

You can use the emblem generator a few different ways. As of 1.2.0, the helper classes have been exported as part of the module in case you wish to expand on the basic methods that are exported by default.

For examples on how to use the base module, take a look in the examples folder where we have a file for each of the exported methods.

SaveEmblemToFile options

The options for the saveEmblemToFile() method are the same options available to the fs.writeFile() method that is present in node by default. For more information, please see the node.js documentation on the method.

guild-emblem-generator's People

Contributors

4lch4 avatar d-w-leaman avatar dependabot[bot] avatar lifeinapod avatar sirdeadlystrike avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

guild-emblem-generator's Issues

Banner colors not tinting properly

What's Wrong?

Currently, when generating an emblem the background color doesn't appear to look quite right, and isn't exactly what is specified. For example, if you use this test emblem object, it'll generate the following image:

const testEmblem = {
  'icon': 97,
  'iconColor': 'ff101517',
  'iconColorId': 15,
  'border': 0,
  'borderColor': 'ff0f1415',
  'borderColorId': 15,
  'backgroundColor': 'fffc6891',
  'backgroundColorId': 49
}

Generated_Image

If you look up the background color, ignoring the first two f values, it's actually much more like this:

fc6891

Why's this happening?

I'm fairly certain this is because when generating the image we mix the default banner color with the desired color when we tint that part of the image and then it doesn't quite look right in the end.

In short, the Modifier class needs updating to properly tint the image instead of mixing the colors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.