GithubHelp home page GithubHelp logo

alephao / nftool Goto Github PK

View Code? Open in Web Editor NEW
153.0 8.0 31.0 218 KB

A suite of tools for NFT generative art.

License: MIT License

Makefile 2.53% Go 97.47%
nft pfp profile-picture generative-art ipfs opensea hacktoberfest

nftool's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nftool's Issues

Rarity Weight

❤❤❤❤❤❤❤
Hi, I was trying to generate arts with the exact weights, finally, I found this module and tried.
But I was a bit surprised because I didn't see the result that I wanted.

Layer Structure

    00-Background
        |- 1.blue.png
        |- 2.white.png
        |- 3.green.png
    01-Body
        |- 1-maroon.png
        |- 2-nut.png
        |- 3-standard.png
        |- 4-yellow.png
    02-Expressions
        |- 1-dot.png
        |- 2-std_lord.png
        |- 3-standard.png

config.yaml

name: 'My Collection #{id}'
description: An awesome collection
external_link: https://myexternallink.com
image: ipfs://myHash/{id}
traits:
- trait_type: Background
  variants:
  - value: blue
    weight: 1
  - value: white
    weight: 2
  - value: green
    weight: 3
  is_optional: false
  optional_weight: 1
- trait_type: Body
  variants:
  - value: maroon
    weight: 1
  - value: nut
    weight: 2
  - value: standard
    weight: 3
  - value: yellow
    weight: 4
  is_optional: false
  optional_weight: 1
- trait_type: Expressions
  variants:
  - value: dot
    weight: 1
  - value: std_lord
    weight: 2
  - value: standard
    weight: 3
  is_optional: false
  optional_weight: 1
path_map:
  Background/blue: ./layers/00-Background/1-blue.png
  Background/green: ./layers/00-Background/3-green.png
  Background/white: ./layers/00-Background/2-white.png
  Body/maroon: ./layers/01-Body/1-maroon.png
  Body/nut: ./layers/01-Body/2-nut.png
  Body/standard: ./layers/01-Body/3-standard.png
  Body/yellow: ./layers/01-Body/4-yellow.png
  Expressions/dot: ./layers/02-Expressions/1-dot.png
  Expressions/standard: ./layers/02-Expressions/3-standard.png
  Expressions/std_lord: ./layers/02-Expressions/2-std_lord.png

traits_rarity.json

  {
    "total": 30,
    "traits": {
      "Background": {
        "blue": { "Total": 9, "Percentage": 0.3 },  //  Origin: 5               
        "green": { "Total": 10, "Percentage": 0.3333333333333333 }, // Origin: 10
        "white": { "Total": 11, "Percentage": 0.36666666666666664 } // Origin: 15
      },
      "Body": {
        "maroon": { "Total": 4, "Percentage": 0.13333333333333333 },  //  Origin: 3
        "nut": { "Total": 9, "Percentage": 0.3 }, //  Origin: 6
        "standard": { "Total": 8, "Percentage": 0.26666666666666666 },  //  Origin: 9
        "yellow": { "Total": 9, "Percentage": 0.3 } //  Origin: 12
      },
      "Expressions": {
        "dot": { "Total": 10, "Percentage": 0.3333333333333333 }, //  Origin: 5
        "standard": { "Total": 11, "Percentage": 0.36666666666666664 }, //  Origin: 10  
        "std_lord": { "Total": 9, "Percentage": 0.3 } //  Origin: 15
      }
    }
  }

🙋‍♂️ Please let me know what I made a mistake, and how I can solve this problem perfectly.

🙏 Thanks.

png image size

Hi,
First I have to say, this is a pretty cool tool! Thanks for that.

I have an issue with the file size of the png images. They are about 25 MB and they should be about 40 kB.
Is there a solution for this?
I've been messing about with the imgen.go file and put in BestCompression but this doesn't solve the file size.

Looking forward to hear from you!

Adjust output images dimensions

Looks like the weight and height property of nftool images doesn't adjust output dimension.

For example, the traits all have 3000x3000 dimension, but I want the output to be 1080x1080 to save size.

Specifying 1080 for height and weight in nfttool images gives distorted images. It works fine when the orig dimension is provided (3000).

Does the library support this?

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.