A GIF art engine that will allow you to generate multi-layer GIFs from single GIFs as layers.

Overview

GIF Art Engine For NFT

Introduction

A GIF art engine that will allow you to generate multi-layer GIFs from single GIFs as layers. All the code in this repository has been written by me in c++, inspired by the generative art engine of HashLips that does not support GIFs as layers. The problem arose from my and my teamleader's need to generate animated images and then GIFs, in the same way as HashLips generated static images.

If you found my work useful for any of your projects, please make some donations to support me.

MetaMask address: 0x58d55348e16C1241D1b7e9238c7753e9c7BF19CB

What does the code allow you to do?

When you have downloaded the code you will be able to generate your own GIFs using GIFs as layers. What the code will do is overlay all the GIFs you have chosen in the desired order and generate n final gifs. This is an example of generating a gif with five separate layers:

Num of layer Layer Name Gif
1 Background f8f9f9.gif Alt Text
2 Character zombie-male.gif Alt Text
3 Head tophat.gif Alt Text
4 Eyes bigshades.gif Alt Text
5 Mouth lipstick-party_pink.gif Alt Text

Output:

Alt Text

What functionality does it offer?

  • Generate GIFs uniquely randomly or by selecting a rarity for each individual layer.

  • Generation of a preview GIF containing the first n GIFs generated.

  • Modification of JSON (Metadata) after GIF generation.

  • After generating a collection you will automatically find in the output folder a file called rarity-list that will tell you the percentage of presence of each layer in the collection.

Project Structure

├── layers
│   ├── 1-background
│   │        ├── 2e3338.gif
│   │        ├── f8f9f9.gif
│   │        ...
│   ├── 2-character
│   │       ├── alien-male_180.gif
│   │       ├── ape-alien-male.gif
│   │       ...
│   ├── 3-eyes
│   │     ├── 3dglasses.gif
│   │     ├── bigshades.gif
│   │     ...
│   ├── 4-head
│   │     ├── bandana.gif
│   │     ├── beanie.gif
│   │     ...
│   ├── 5-lip
│   │     ├── lipstick-burgundy.gif
│   │     ├── lipstick-flashy_blue.gif
│   ...   ...
├── library 
│      ├── dnaGenerator.cpp
│      ├── dnaGenerator.hpp
│      ├── metadataFunction.cpp
│      ├── metadataFunction.hpp
│      ├── myFFmpegConversion.cpp
│      ├── myFFmpegConversion.hpp
│      ├── utils.cpp
│      └── utils.hpp
├── output
│     ├── images
│     │     ├── 1.gif
│     │     ├── 2.gif
│     │     ...
│     ├── json
│     │    ├── _metadata.json
│     │    ├── 1.json
│     │    ├── 2.json
│     │    ...
│     ├── preview_gif.gif
│     └── rarity_list
├── src
│    ├── main.cpp
│    ├── preview_gif.cpp
│    └── update_info.cpp
├── tmp
│    ├── 1.mp4
│    ├── 2.mp4
│    ├── 3.mp4
│    ├── 4.mp4
│    ...
│    ├── punksDna
│    └── listOfVideo.txt
├── example
├── .gitignore 
├── LICENSE
└── README.md
  • example: folder that contains the example shown in the introduction.

  • layers: folder where the subfolders of each animated layer will be placed..

  • library: folder that contains some libraries written by me. The .hpp files contain the declarations, while the .cpp files contain the definitions. Explanation of the files:

    • dnaGenerator: contains all the functions to generate the dna of your NFTs. Either randomly or based on rarity.
    • metadataFunction: contains all the functions used to generate the metadata of your NFTs.
    • myFFmpegConversion: contains useful functions for overlaying layers and converting videos to gifs and vice versa.
    • utils: contains additional features to the standard ones.
  • output: will contain the result of the program execution and therefore all the generated gifs and JSONs. There will also be the rarity-list file and the preview-gif.gif. file.

  • src: contains the main files to compile together with the libraries.

  • tmp: folder where temporary files are stored.

Installation, compilation and execution

Requirements for linux: FFmpeg installed

Requirements for windows: FFmpeg and MinGW installed

On linux if you haven't installed FFmpeg yet, install it with the following command in the terminal:

sudo apt update & sudo apt install ffmpeg -y

On windows to install FFmpeg and MinGW watch these videos:

  1. FFmpeg: https://www.youtube.com/watch?v=r1AtmY-RMyQ

  2. MinGW: https://www.youtube.com/watch?v=guM4XS43m4I&t=305s

The code was tested with FFmpeg version 4.2.4.

If you want to clone the project, run this command:

git clone https://github.com/Goldo02/gif_art_engine_for_nft.git

After doing so, move to the folder where you cloned the project and go to the src folder.

To compile the main.cpp file use the command:

g++ ../library/dnaGenerator.cpp ../library/metadataFunction.cpp ../library/myFFmpegConversion.cpp ../library/utils.cpp main.cpp -o main

To execute:

./main

To compile the update-info.cpp file, use the command:

g++ ../library/utils.cpp ../library/metadataFunction.cpp update_info.cpp -o update_info

To execute:

./update_info

To compile the file preview-gif.cpp use the command:

g++ ../library/myFFmpegConversion.cpp preview_gif.cpp -o preview_gif

To execute:

./preview_gif

Note: remember that every time you modify one of the three files you must also recompile it before running it, otherwise you will run the program out of date with the changes you made.

Usage

To use the algorithm and modify it according to your needs you must open the file main.cpp. Inside it you can distinguish three different sections: layer management, metadata management, rarity management. Description of variables:

  • Layer Management:

    • numbOfPunkToGen: contains the total number of gifs you want to generate

    • scale: contains the size in px of the images

    • randomized: set to true if you want to generate a collection randomly, regardless of rarity. Set to false generates the collection according to the rarity set later.

    • layerDir: vector containing the name of the folders of each layer

    • singleLayer: multidimensional vector that contains the name of every single sprite-sheet (in gif format) in every single layer folder. The name of these must match the name of the file in the folders. The use of spaces is not allowed.

  • Metadata management:

    • singleLayerName: name you want to appear in the metadata regarding the specified sprite-sheet..

    • name: collection name.

    • description: collection description.

    • image: links where gifs and JSONs will be hosted.

    • extraMetadata: vector that contains some metadata you want to add to each JSON.

  • Rarity Management:

    • rarityList: multidimensional vector of numbers that contains the probability that character has of being selected. The sum of each probability entered for a specific layer must make 100.

This is an example with a collection of mine:

> singleLayer = { {"Celo_Dark.gif", "Celo_Gray.gif", "Faint_Gold.gif"}, {"Ape_Male_Alien.gif", "Blue_Cool_Woman.gif", "Dark_Female_Human.gif", "Dark_Male_Human.gif", "Darker_Male_Human.gif", "Female_Alien.gif", "Female_Ape.gif", "Female_Orc.gif", "Female_Zombie.gif", "Goddess_Night_Woman.gif", "Light_Male_Human.gif", "Lighter_Female_Human.gif", "Lighter_Male_Human.gif", "Male_Alien.gif", "Male_Ape.gif", "Male_Mummy.gif", "Male_Orc.gif", "Male_Robot.gif", "Male_Vampire.gif", "Male_Zombie_Ape.gif", "Male_Zombie.gif", "Red_Burning_Woman.gif"}, {"Bandana.gif", "Beanie.gif", "Blue_Cap.gif", "Cap_Forward.gif", "Cowboy_Hat.gif", "Crazy_Hair.gif", "Fedora.gif", "Green_Cap.gif", "Knitted_Cap.gif", "Male_Wild_Hair.gif", "Top_Hat.gif", "Wallstreetbets_Dark_Crazy_Hair.gif", "Wallstreetbets_Hair.gif"}, {"3D_Glasses.gif", "Big_Shades.gif", "Classic_Shades.gif", "Empty.gif", "Eyepatch.gif", "Male_Earring.gif", "Nerd_Glasses.gif", "Regular_Shades.gif"}, {"Burgundy_Lipstick.gif", "Flashy_Blue_Lipstick.gif", "Gold_Lipstick.gif", "Party_Pink_Lipstick.gif", "Passion_Red_Lipstick.gif", "Purple_Lipstick.gif", "Space_Lipstick.gif", "Pipe.gif"} }; //METADATA MANAGEMENT const vector > singleLayerName = { {"Celo Dark", "Celo Gray", "Faint Gold"}, {"Ape Male Alien", "Blue Cool Woman", "Dark Female Human", "Dark Male Human", "Darker Male Human", "Female Alien", "Female Ape", "Female Orc", "Female Zombie", "Goddess Night Woman", "Light Male Human", "Lighter Female Human", "Lighter Male Human", "Male Alien", "Male Ape", "Male Mummy", "Male Orc", "Male Robot", "Male Vampire", "Male Zombie Ape", "Male Zombie", "Red Burning Woman"}, {"Bandana", "Beanie", "Blue Cap", "Cap Forward", "Cowboy Hat", "Crazy Hair", "Fedora", "Green Cap", "Knitted Cap", "Male Wild Hair", "Top Hat", "Wallstreetbets Dark Crazy Hair", "Wallstreetbets Hair"}, {"3D Glasses", "Big Shades", "Classic Shades", "Empty", "Eyepatch", "Male Earring", "Nerd Glasses", "Regular Shades"}, {"Burgundy Lipstick", "Flashy Blue Lipstick", "Gold Lipstick", "Party Pink Lipstick", "Passion Red Lipstick", "Purple Lipstick", "Space Lipstick", "Pipe"} }; const string name = "CeloPunk Animated Edition"; const string description = "CeloPunks Animated Edition is a collection of 1500 unique special animated punks. Not affiliated with LarvaLabs."; const string image = ""; const vector > extraMetadata = { {"Compiler", "CeloPunks Algorithm"} }; //RARITY MANAGEMENT const vector > rarityList = { {20, 30, 50}, //3 {1, 7, 7, 7, 7, 4, 4, 4, 4, 6, 9, 9, 9, 2, 2, 2, 3, 2, 2, 2, 3, 4}, //22 {11, 1, 13, 11, 3, 1, 4, 13, 11, 3, 13, 13, 3}, //13 {6, 6, 12, 20, 12, 20, 9, 15}, //8 {18, 16, 5, 20, 5, 17, 16, 3}, //8 };">
//LAYER MANAGEMENT
const int numbOfPunkToGen = 1500;
const int scale = 240;
const bool randomized = false;
const vector
          layerDir = {
         "1-background", 
         "2-character", 
         "4-head", 
         "3-eyes", 
         "5-lip"};

         const vector
         
          
           > singleLayer = 
{
{
           "Celo_Dark.gif", 
           "Celo_Gray.gif", 
           "Faint_Gold.gif"}, 

{
           "Ape_Male_Alien.gif", 
           "Blue_Cool_Woman.gif", 
           "Dark_Female_Human.gif", 
           "Dark_Male_Human.gif", 
           "Darker_Male_Human.gif", 
           "Female_Alien.gif", 
           "Female_Ape.gif", 
           "Female_Orc.gif", 
           "Female_Zombie.gif", 
           "Goddess_Night_Woman.gif", 
           "Light_Male_Human.gif", 
           "Lighter_Female_Human.gif", 
           "Lighter_Male_Human.gif", 
           "Male_Alien.gif", 
           "Male_Ape.gif", 
           "Male_Mummy.gif", 
           "Male_Orc.gif", 
           "Male_Robot.gif", 
           "Male_Vampire.gif", 
           "Male_Zombie_Ape.gif", 
           "Male_Zombie.gif", 
           "Red_Burning_Woman.gif"},

{
           "Bandana.gif", 
           "Beanie.gif", 
           "Blue_Cap.gif", 
           "Cap_Forward.gif", 
           "Cowboy_Hat.gif", 
           "Crazy_Hair.gif", 
           "Fedora.gif", 
           "Green_Cap.gif", 
           "Knitted_Cap.gif", 
           "Male_Wild_Hair.gif", 
           "Top_Hat.gif", 
           "Wallstreetbets_Dark_Crazy_Hair.gif", 
           "Wallstreetbets_Hair.gif"},

{
           "3D_Glasses.gif", 
           "Big_Shades.gif", 
           "Classic_Shades.gif", 
           "Empty.gif", 
           "Eyepatch.gif", 
           "Male_Earring.gif", 
           "Nerd_Glasses.gif", 
           "Regular_Shades.gif"},

{
           "Burgundy_Lipstick.gif", 
           "Flashy_Blue_Lipstick.gif", 
           "Gold_Lipstick.gif", 
           "Party_Pink_Lipstick.gif", 
           "Passion_Red_Lipstick.gif", 
           "Purple_Lipstick.gif", 
           "Space_Lipstick.gif", 
           "Pipe.gif"}
};


           //METADATA MANAGEMENT

           const vector
           
            
             > singleLayerName = 
{
{
             "Celo Dark", 
             "Celo Gray", 
             "Faint Gold"}, 

{
             "Ape Male Alien", 
             "Blue Cool Woman", 
             "Dark Female Human", 
             "Dark Male Human", 
             "Darker Male Human", 
             "Female Alien", 
             "Female Ape", 
             "Female Orc", 
             "Female Zombie", 
             "Goddess Night Woman", 
             "Light Male Human", 
             "Lighter Female Human", 
             "Lighter Male Human", 
             "Male Alien", 
             "Male Ape", 
             "Male Mummy", 
             "Male Orc", 
             "Male Robot", 
             "Male Vampire", 
             "Male Zombie Ape", 
             "Male Zombie", 
             "Red Burning Woman"},

{
             "Bandana", 
             "Beanie", 
             "Blue Cap", 
             "Cap Forward", 
             "Cowboy Hat", 
             "Crazy Hair", 
             "Fedora", 
             "Green Cap", 
             "Knitted Cap", 
             "Male Wild Hair", 
             "Top Hat", 
             "Wallstreetbets Dark Crazy Hair", 
             "Wallstreetbets Hair"},

{
             "3D Glasses", 
             "Big Shades", 
             "Classic Shades", 
             "Empty", 
             "Eyepatch", 
             "Male Earring", 
             "Nerd Glasses", 
             "Regular Shades"},

{
             "Burgundy Lipstick", 
             "Flashy Blue Lipstick", 
             "Gold Lipstick", 
             "Party Pink Lipstick", 
             "Passion Red Lipstick", 
             "Purple Lipstick", 
             "Space Lipstick", 
             "Pipe"}
};

             const string name = 
             "CeloPunk Animated Edition";

             const string description = 
             "CeloPunks Animated Edition is a collection of 1500 unique special animated punks. Not affiliated with LarvaLabs.";

             const string image = 
             "";

             const vector
             
              
               > extraMetadata = { {
               "Compiler", 
               "CeloPunks Algorithm"} }; 
               //RARITY MANAGEMENT 
               const vector
               
                <
                int>> rarityList = { {
                20, 
                30, 
                50}, 
                //3 {
                1, 
                7, 
                7, 
                7, 
                7, 
                4, 
                4, 
                4, 
                4, 
                6, 
                9, 
                9, 
                9, 
                2, 
                2, 
                2, 
                3, 
                2, 
                2, 
                2, 
                3, 
                4}, 
                //22 {
                11, 
                1, 
                13, 
                11, 
                3, 
                1, 
                4, 
                13, 
                11, 
                3, 
                13, 
                13, 
                3}, 
                //13 {
                6, 
                6, 
                12, 
                20, 
                12, 
                20, 
                9, 
                15}, 
                //8 {
                18, 
                16, 
                5, 
                20, 
                5, 
                17, 
                16, 
                3}, 
                //8 };
               
              
             
            
           
          
         
        

Update metadata

Open the update-info.cpp file located in the src folder. Here too you will find a number of variables that you can modify. Modify them according to your needs and then run the code to update the metadata.

Example:

> &extraMetadata = { {"Compiler:", "CeloPunks Algorithm"} };">
const string name = "CeloPunk Animated Edition";
const string description = "CeloPunks Animated Edition is a collection of 1500 unique special animated punks. Not affiliated with LarvaLabs.";
const string image = "";
const int numbOfPunkToGen = 1500;
const int nLayers = 5;
const vector
   
    > &extraMetadata = 
{
{
    "Compiler:", 
    "CeloPunks Algorithm"}
};
   
  

Creating a gif preview

Open the preview-gif.cpp file located in the src folder. In this file the only parameter present is numbOfPunkToGen which is a number that indicates the first n GIFs that must be taken from the collection to generate the preview.

Example:

const int numbOfPunkToGen = 350;

This way the first 350 GIFs in our collection will be used to generate a preview.

Comments
  • Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

    Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

    first time i use i have [gif @ 0x55c74bad1a00] invalid block label and Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used) eror show up and the gif corrupted

    but after i remove -ss it can run but another error still remain [gif @ 0x55c74bad1a00] invalid block label for each layer

    note : btw i use your original gif Screenshot 2022-02-26 012502

    opened by Ugijago 14
  • Help creating .mp4 with sound.

    Help creating .mp4 with sound.

    Thanks for this repository. I am currently trying to get it working. I am getting the gifs to come out properly but having trouble when trying to add the audio. Maybe a little more detail on that process would help. It seems the tutorial video - which I watched - did not cover that section. Also, is there any way for me to autoloop the final .mp4?

    Thanks bro, much luv!

    I added you on Discord, please accept my friend request.

    opened by xBuddhaSupreme 4
  • can you help me? cant add your discord

    can you help me? cant add your discord

    my discord yakushevhk#3223

    [gif @ 0x5629d977d640] invalid block label Input #1, gif, from './layers/2-character/Red_Burning_Woman#80.gif': Duration: 00:00:02.40, start: 0.000000, bitrate: 49 kb/s Stream #1:0: Video: gif, bgra, 240x240, 10 fps, 10 tbr, 100 tbn, 100 tbc [gif @ 0x5629d9784fc0] invalid block label Input #2, gif, from './layers/3-head/Top_Hat#30.gif': Duration: 00:00:02.40, start: 0.000000, bitrate: 24 kb/s Stream #2:0: Video: gif, bgra, 240x240, 10 fps, 10 tbr, 100 tbn, 100 tbc Stream mapping: Stream #0:0 (gif) -> overlay:main Stream #1:0 (gif) -> overlay:overlay Stream #2:0 (gif) -> overlay:overlay paletteuse -> Stream #0:0 (gif) Press [q] to stop, [?] for help [gif @ 0x5629d976c640] invalid block label Output #0, gif, to './output/media/14.gif': Metadata: encoder : Lavf58.29.100 Stream #0:0: Video: gif, pal8, 240x240, q=2-31, 200 kb/s, 10 fps, 100 tbn, 10 tbc (default) Metadata: encoder : Lavc58.54.100 gif Error writing trailer of ./output/media/14.gif: Invalid argument frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

    opened by yakushevhk 4
  • Issue when trying to compile myFFmpegConversion.ccp

    Issue when trying to compile myFFmpegConversion.ccp

    There is an issue when trying to compile myFFmpegConversion.ccp

    There is an undefined reference to extractInteger on line 155 which is causing it to not compile - am I missing something?

    I have the latest version of the repo and I am using Linux on Windows.

    Many thanks for this repo!

    opened by Westy-Dev 3
  • 19 errors on Mac

    19 errors on Mac

    When I run:

    g++ ../library/utils.cpp ../library/metadataFunction.cpp update_info.cpp -o update_info

    I get:

    In file included from ../library/utils.cpp:1: ../library/utils.hpp:6:73: error: a space is required between consecutive right angle brackets (use '> >') void createRarityFile(const vector &, const vector<vector> &, const int &); ^~ > > ../library/utils.hpp:7:96: error: a space is required between consecutive right angle brackets (use '> >') void updateInfo(const string &, const string &, const string &, const vector<pair<string,string>> &, const int &, const int&); ^~ > > ../library/utils.cpp:9:81: error: a space is required between consecutive right angle brackets (use '> >') void createRarityFile(const vector &layerDir, const vector<vector> &singleLayer, const int &numbOfPunkToGen) ^~ > > ../library/utils.cpp:11:22: error: a space is required between consecutive right angle brackets (use '> >') vector<vector> numberOfLayers((int)layerDir.size()); ^~ > > ../library/utils.cpp:47:116: error: a space is required between consecutive right angle brackets (use '> >') void updateInfo(const string &name, const string &description, const string &image, const vector<pair<string,string>> &extraMetadata, const int &numbOfPunkToGen, const int &nLayers) ^~ > > 5 errors generated. In file included from ../library/metadataFunction.cpp:1: ../library/metadataFunction.hpp:7:114: error: a space is required between consecutive right angle brackets (use '> >') static void generateSingleMetadata(const vector &, int, const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &); ^~ > > ../library/metadataFunction.hpp:7:198: error: a space is required between consecutive right angle brackets (use '> >') static void generateSingleMetadata(const vector &, int, const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &); ^~ > > ../library/metadataFunction.hpp:8:80: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunksMetadata(const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &, const int &); ^~ > > ../library/metadataFunction.hpp:8:164: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunksMetadata(const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &, const int &); ^~ > > ../library/metadataFunction.cpp:12:138: error: a space is required between consecutive right angle brackets (use '> >') static void generateSingleMetadata(const vector &punkDna, int currGen, const vector &layerDir, const vector<vector> &singleLayer, const string &name, const string &description, const string &image, const vector<pair<string,string>> &extraMetadata) ^~ > > ../library/metadataFunction.cpp:12:254: error: a space is required between consecutive right angle brackets (use '> >') static void generateSingleMetadata(const vector &punkDna, int currGen, const vector &layerDir, const vector<vector> &singleLayer, const string &name, const string &description, const string &image, const vector<pair<string,string>> &extraMetadata) ^~ > > ../library/metadataFunction.cpp:85:89: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunksMetadata(const vector &layerDir, const vector<vector> &singleLayer, const string &name, const string &description, const string &image, const vector<pair<string,string>> &extraMetadata, const int &numbOfPunkToGen) ^~ > > ../library/metadataFunction.cpp:85:205: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunksMetadata(const vector &layerDir, const vector<vector> &singleLayer, const string &name, const string &description, const string &image, const vector<pair<string,string>> &extraMetadata, const int &numbOfPunkToGen) ^~ > > 8 errors generated. In file included from update_info.cpp:3: ./../library/utils.hpp:6:73: error: a space is required between consecutive right angle brackets (use '> >') void createRarityFile(const vector &, const vector<vector> &, const int &); ^~ > > ./../library/utils.hpp:7:96: error: a space is required between consecutive right angle brackets (use '> >') void updateInfo(const string &, const string &, const string &, const vector<pair<string,string>> &, const int &, const int&); ^~ > > In file included from update_info.cpp:4: ./../library/metadataFunction.hpp:7:114: error: a space is required between consecutive right angle brackets (use '> >') static void generateSingleMetadata(const vector &, int, const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &); ^~ > > ./../library/metadataFunction.hpp:7:198: error: a space is required between consecutive right angle brackets (use '> >') static void generateSingleMetadata(const vector &, int, const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &); ^~ > > ./../library/metadataFunction.hpp:8:80: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunksMetadata(const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &, const int &); ^~ > > ./../library/metadataFunction.hpp:8:164: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunksMetadata(const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &, const int &); ^~ > > update_info.cpp:15:36: error: a space is required between consecutive right angle brackets (use '> >') const vector<pair<string,string>> &extraMetadata = ^~ > > update_info.cpp:15:40: error: reference to type 'const vector<pair<std::string, std::string> >' (aka 'const vector<pair<basic_string, basic_string > >') cannot bind to an initializer list const vector<pair<string,string>> &extraMetadata = ^ 8 errors generated. [email protected] src % ./update_info zsh: exec format error: ./update_info [email protected] src % g++ ../library/dnaGenerator.cpp ../library/metadataFunction.cpp ../library/myFFmpegConversion.cpp ../library/utils.cpp main.cpp -o main In file included from ../library/dnaGenerator.cpp:1: ../library/dnaGenerator.hpp:7:62: error: a space is required between consecutive right angle brackets (use '> >') void genAndSaveDnaRandomly(string, const vector<vector> &, const int); ^~ > > ../library/dnaGenerator.hpp:8:64: error: a space is required between consecutive right angle brackets (use '> >') void genAndSaveDnaWithRarity(string, const vector<vector> &, const vector<vector> &, const int); ^~ > > ../library/dnaGenerator.hpp:8:93: error: a space is required between consecutive right angle brackets (use '> >') void genAndSaveDnaWithRarity(string, const vector<vector> &, const vector<vector> &, const int); ^~ > > ../library/dnaGenerator.cpp:22:71: error: a space is required between consecutive right angle brackets (use '> >') void genAndSaveDnaRandomly(string nameFile, const vector<vector> &singleLayer, const int numbOfPunkToGen) ^~ > > ../library/dnaGenerator.cpp:184:73: error: a space is required between consecutive right angle brackets (use '> >') void genAndSaveDnaWithRarity(string nameFile, const vector<vector> &singleLayer, const vector<vector> &rarityList, const int numbOfPunkToGen) ^~ > > ../library/dnaGenerator.cpp:184:113: error: a space is required between consecutive right angle brackets (use '> >') void genAndSaveDnaWithRarity(string nameFile, const vector<vector> &singleLayer, const vector<vector> &rarityList, const int numbOfPunkToGen) ^~ > > ../library/dnaGenerator.cpp:186:22: error: a space is required between consecutive right angle brackets (use '> >') vector<vector> rarityValue((int)singleLayer.size()); ^~ > > 7 errors generated. In file included from ../library/metadataFunction.cpp:1: ../library/metadataFunction.hpp:7:114: error: a space is required between consecutive right angle brackets (use '> >') static void generateSingleMetadata(const vector &, int, const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &); ^~ > > ../library/metadataFunction.hpp:7:198: error: a space is required between consecutive right angle brackets (use '> >') static void generateSingleMetadata(const vector &, int, const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &); ^~ > > ../library/metadataFunction.hpp:8:80: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunksMetadata(const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &, const int &); ^~ > > ../library/metadataFunction.hpp:8:164: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunksMetadata(const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &, const int &); ^~ > > ../library/metadataFunction.cpp:12:138: error: a space is required between consecutive right angle brackets (use '> >') static void generateSingleMetadata(const vector &punkDna, int currGen, const vector &layerDir, const vector<vector> &singleLayer, const string &name, const string &description, const string &image, const vector<pair<string,string>> &extraMetadata) ^~ > > ../library/metadataFunction.cpp:12:254: error: a space is required between consecutive right angle brackets (use '> >') static void generateSingleMetadata(const vector &punkDna, int currGen, const vector &layerDir, const vector<vector> &singleLayer, const string &name, const string &description, const string &image, const vector<pair<string,string>> &extraMetadata) ^~ > > ../library/metadataFunction.cpp:85:89: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunksMetadata(const vector &layerDir, const vector<vector> &singleLayer, const string &name, const string &description, const string &image, const vector<pair<string,string>> &extraMetadata, const int &numbOfPunkToGen) ^~ > > ../library/metadataFunction.cpp:85:205: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunksMetadata(const vector &layerDir, const vector<vector> &singleLayer, const string &name, const string &description, const string &image, const vector<pair<string,string>> &extraMetadata, const int &numbOfPunkToGen) ^~ > > 8 errors generated. In file included from ../library/myFFmpegConversion.cpp:1: ../library/myFFmpegConversion.hpp:9:73: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunks(const vector &, const vector<vector> &, const int, const int); ^~ > > ../library/myFFmpegConversion.cpp:75:81: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunks(const vector &layerDir, const vector<vector> &singleLayer, const int numbOfPunkToGen, const int scale) ^~ > > 2 errors generated. In file included from ../library/utils.cpp:1: ../library/utils.hpp:6:73: error: a space is required between consecutive right angle brackets (use '> >') void createRarityFile(const vector &, const vector<vector> &, const int &); ^~ > > ../library/utils.hpp:7:96: error: a space is required between consecutive right angle brackets (use '> >') void updateInfo(const string &, const string &, const string &, const vector<pair<string,string>> &, const int &, const int&); ^~ > > ../library/utils.cpp:9:81: error: a space is required between consecutive right angle brackets (use '> >') void createRarityFile(const vector &layerDir, const vector<vector> &singleLayer, const int &numbOfPunkToGen) ^~ > > ../library/utils.cpp:11:22: error: a space is required between consecutive right angle brackets (use '> >') vector<vector> numberOfLayers((int)layerDir.size()); ^~ > > ../library/utils.cpp:47:116: error: a space is required between consecutive right angle brackets (use '> >') void updateInfo(const string &name, const string &description, const string &image, const vector<pair<string,string>> &extraMetadata, const int &numbOfPunkToGen, const int &nLayers) ^~ > > 5 errors generated. In file included from main.cpp:9: ./../library/myFFmpegConversion.hpp:9:73: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunks(const vector &, const vector<vector> &, const int, const int); ^~ > > In file included from main.cpp:10: ./../library/metadataFunction.hpp:7:114: error: a space is required between consecutive right angle brackets (use '> >') static void generateSingleMetadata(const vector &, int, const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &); ^~ > > ./../library/metadataFunction.hpp:7:198: error: a space is required between consecutive right angle brackets (use '> >') static void generateSingleMetadata(const vector &, int, const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &); ^~ > > ./../library/metadataFunction.hpp:8:80: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunksMetadata(const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &, const int &); ^~ > > ./../library/metadataFunction.hpp:8:164: error: a space is required between consecutive right angle brackets (use '> >') void generateAllPunksMetadata(const vector&, const vector<vector>&, const string &, const string &, const string &, const vector<pair<string,string>> &, const int &); ^~ > > In file included from main.cpp:11: ./../library/dnaGenerator.hpp:7:62: error: a space is required between consecutive right angle brackets (use '> >') void genAndSaveDnaRandomly(string, const vector<vector> &, const int); ^~ > > ./../library/dnaGenerator.hpp:8:64: error: a space is required between consecutive right angle brackets (use '> >') void genAndSaveDnaWithRarity(string, const vector<vector> &, const vector<vector> &, const int); ^~ > > ./../library/dnaGenerator.hpp:8:93: error: a space is required between consecutive right angle brackets (use '> >') void genAndSaveDnaWithRarity(string, const vector<vector> &, const vector<vector> &, const int); ^~ > > In file included from main.cpp:12: ./../library/utils.hpp:6:73: error: a space is required between consecutive right angle brackets (use '> >') void createRarityFile(const vector &, const vector<vector> &, const int &); ^~ > > ./../library/utils.hpp:7:96: error: a space is required between consecutive right angle brackets (use '> >') void updateInfo(const string &, const string &, const string &, const vector<pair<string,string>> &, const int &, const int&); ^~ > > main.cpp:25:26: error: non-aggregate type 'const vectorstd::string' (aka 'const vector<basic_string >') cannot be initialized with an initializer list const vector layerDir = {"1-background", "2-character", "3-lip", "4-head", "5-eyes"}; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:27:31: error: a space is required between consecutive right angle brackets (use '> >') const vector<vector> singleLayer = ^~ > > main.cpp:27:34: error: non-aggregate type 'const vector<vectorstd::string >' (aka 'const vector<vector<basic_string > >') cannot be initialized with an initializer list const vector<vector> singleLayer = ^ main.cpp:41:31: error: a space is required between consecutive right angle brackets (use '> >') const vector<vector> singleLayerName = ^~ > > main.cpp:41:34: error: non-aggregate type 'const vector<vectorstd::string >' (aka 'const vector<vector<basic_string > >') cannot be initialized with an initializer list const vector<vector> singleLayerName = ^ main.cpp:57:36: error: a space is required between consecutive right angle brackets (use '> >') const vector<pair<string,string>> extraMetadata = ^~ > > main.cpp:57:39: error: non-aggregate type 'const vector<pair<std::string, std::string> >' (aka 'const vector<pair<basic_string, basic_string > >') cannot be initialized with an initializer list const vector<pair<string,string>> extraMetadata = ^ main.cpp:63:28: error: a space is required between consecutive right angle brackets (use '> >') const vector<vector> rarityList = ^~ > > main.cpp:63:31: error: non-aggregate type 'const vector<vector >' cannot be initialized with an initializer list const vector<vector> rarityList = ^ 19 errors generated.

    opened by jozk8 3
  • Invalid File Index 2 in filtergraph error?

    Invalid File Index 2 in filtergraph error?

    image

    getting this error when using ./main sol

    This works with other sets of layers I'm using, but not with these! also note that there's only 2 layers with 2 .gifs each. just testing them out.

    really at a loss and anything helps!

    ok i added a background folder with 2 backgrounds and that fixed it. I'm not sure what prompted this error in the first place but it isss what it is.

    opened by mrcrayon1 2
  • It zooms the layers, stops the gif after 1 second

    It zooms the layers, stops the gif after 1 second

    Hi!

    So i've got a 5second gif for background, and all the other layers are PNGs. It just zooms in a lot for the pngs, even if i modify the scale, what could be the problem? And it resets after 1 second.

    (All the layers are the same size)

    opened by kisbalazspatrik 2
  • Conversion not precise and timings are completely off

    Conversion not precise and timings are completely off

    The combined .mp4 from gifs isn't the same size as the output:

    For example - the input gifs have 2.3s and the combined .mp4 file has 2.4s whilst the exported gif has 2.14s. So this is not matching frames during the process. Attaching the screen:

    conersion-not-exact
    opened by jozkr8 2
  • Having Difficulties running the program in windows

    Having Difficulties running the program in windows

    I have installed both FFmpeg and MinGW. I have tried running the program on windows but it is still not working. I have gotten an error in the src folder (main.cpp) under time(NULL).

    If you don't mind, would you please make a screen record of how you can run the program in windows and genenerate the GIFS. Even if its just recording without any sound (screen recording). You may upload to youtube then please share the link here.

    I'll really appreaciate your help and make a donation.

    opened by Dejanrobi 2
  • Floating point exception (core dumped)

    Floating point exception (core dumped)

    Hello, When I run the main script, It doesn't work and I get this message in console : Floating point exception (core dumped)

    When I set the randomized bool to true, it works. I want to do it with rarity though. What do I need to cdo ? I checked if the sum of all rarities was 100.

    opened by diklou 2
  • vector<int> collectionSize = {x,y,z}; Are more than two different combinations of the layers possible?

    vector collectionSize = {x,y,z}; Are more than two different combinations of the layers possible?

    Hello!

    Thank you for making this code, I've been using it to make some cool stuff. Is that metamask address 0xaE9d8FD177c22D88159F2773998dB07CAf40693d up to date? I would like to send you an NFT to say thank you. I have sent you a discord friend invite: JuiceGoose#3498.

    I am a programming noob, I wanted to know if it is possible to make more than just 2 of the collectionsize layer combinations. For example vector collectionSize = {w,x,y,z}; to create 4 different combinations of the layers? This would be incredibly useful to have. Currently when I try I get a segfault.

    Thank you for your help.

    opened by JuiceGoose1 1
Owner
Andre
futuro in bilico fra informatico e falegname
Andre
pongoOS module for playing animated GIFs

bad_apple module This is a simple pongoOS module for playing animated GIFs in pongoOS. The code does work but since it uses GIFs, compiled modules can

null 25 Apr 14, 2022
PoC black/white image sequence to dumpy gif image sequence converter

PoC black/white image sequence to dumpy gif image sequence converter

null 67 Sep 24, 2022
Video, Image and GIF upscale/enlarge(Super-Resolution) and Video frame interpolation. Achieved with Waifu2x, SRMD, RealSR, Anime4K, RIFE, CAIN, DAIN and ACNet.

Video, Image and GIF upscale/enlarge(Super-Resolution) and Video frame interpolation. Achieved with Waifu2x, SRMD, RealSR, Anime4K, RIFE, CAIN, DAIN and ACNet.

Aaron Feng 7.8k Oct 2, 2022
Import GIF/WebP animated image as a new AnimatedTexture asset type.

Animated Texture Plugin for Unreal Engine 5 This plugin allows you to import animated pictures into your Unreal Engine 5 project as a new AnimatedText

房燕良 30 Sep 17, 2022
A slim, fast and header-only GIF loader written in C

gif_load This is an ANSI C compatible animated GIF loader in a single header file of less than 300 lines of code (less than 200 without empty lines an

Andrey Guskov 67 Sep 9, 2022
An image and texture viewer for tga, png, apng, exr, dds, gif, hdr, jpg, tif, ico, webp, and bmp files

An image and texture viewer for tga, png, apng, exr, dds, gif, hdr, jpg, tif, ico, webp, and bmp files. Uses Dear ImGui, OpenGL, and Tacent. Useful for game devs as it displays information like the presence of an alpha channel and querying specific pixels for their colour.

Tristan Grimmer 146 Sep 14, 2022
This program converts APNG animations into animated GIF format

apng2gif This project has been in disrepair for long time. Recently, there is need to change the number of loops in apng file. So I used it to modify

Ted Zyzsdy 1 Jan 20, 2022
Diagon transforms markdown-style expression into an ascii-art representation.

Diagon is an interactive interpreter. It transforms markdown-style expression into an ascii-art representation.It is written in C++ and use WebAssembly, HTML and CSS to make a Web Application.

Arthur Sonzogni 981 Sep 27, 2022
Simple image to ASCII art converter

ascii-art Simple image to ASCII art converter for Windows. Does not support gifs (for now). Usage Unzip the .zip folder from the releases and put your

Mattias Aksli 2 Jul 13, 2022
Convert images to ASCII art.

Image-to-ascii Convert images to ASCII art. This program using stb library to load images. Usage Usage: compile the program to get *.out file

Abdeljalil Bouchfar 13 Aug 20, 2022
Make It Pixel is a programming language to process images to look like pixel art.

Make images look like pixel art Make It Pixel is a programming language to process images to look like pixel art. Its interpreter is written in C++ an

null 16 Sep 7, 2022
YAITAA - Yet Another Image To A(NSI) Art (converter).

YAITAA - Yet Another Image To A(NSI) Art (converter).

hkc 9 Sep 13, 2022
YAITAA - Yet Another Image To A(NSI) Art (converter)

YAITAA - Yet Another Image To A(NSI) Art (converter) Yes, very original. Old name is asciify-reborn for reasons stated bellow Reasons for reimplementa

hkc 9 Sep 13, 2022
Generate Height map with Generator (OpenGL and imgui) and Construct Splat Map with generated height map using Algorithm

Generate Height map with Generator (OpenGL and imgui) and Construct Splat Map with generated height map using Algorithm(DPS, BFS, Gradient Descent ... etc) . At Renderer, with height map and blend map which are generated in front of this stage, render high quality terrain with OpenGL

Snowapril 35 Mar 22, 2022
libvot - A C++11 multi-thread library for image retrieval

libvot is a fast implementation of vocabulary tree, which is an algorithm widely used in image retrieval and computer vision. It usually comprises three components to build a image retrieval system using vocabulary tree: build a k-means tree using sift descriptors from images, register images into the database, query images against the database. I

Tianwei Shen 170 Sep 21, 2022
A ImGui Application with Multi Viewports and Docking using D3D11

ImGui-Application Informations A ImGui Application with Multi Viewports and Docking using D3D11 Build You need the DirectX SDK, here the Download link

Argon Projects 10 Sep 23, 2022
NanoPM, single header only PatchMatch

NanoPM, single header only PatchMatch NanoPM is a single header-only implementation of PatchMatch algorithm written in C++. Could be used for variety

null 67 Sep 27, 2022
Utility to combine color channels from different textures into a single output.

unity-texture-packer ?? Utility to merge different texture channels into a final texture output. Install Using Git Make sure the Git client is install

Andy Duboc 572 Sep 25, 2022
NanoSVG is a simple stupid single-header-file SVG parse

This project is not actively maintained. Nano SVG Parser NanoSVG is a simple stupid single-header-file SVG parse.

Mikko Mononen 1.3k Oct 4, 2022