Coder Social home page Coder Social logo

bgmaker's Introduction

bgmaker (Background Maker)

Create background images using C++, ImageMagick and L-Systems. This is a WIP.

Getting Started

Requirements

Install the library ImageMagick. In Ubuntu 20.04

$ sudo apt install libmagick++-dev

Build

Clone this repository and all his submodules

$ git clone --recursive https://github.com/h-valdes/bgmaker
$ cd bgmaker
$ mkdir build
$ cd Build
$ cmake ..
$ make

Use

Inside of the build directory:

$ ./bgmaker draw

And to preview the image with ImageMagick

$ ./bgmaker draw --preview

To override the default values use the config file

$ ./bgmaker draw --preview --config "../config.toml"

Examples

Example 1

# config.toml
[general]
output-file = "bg1.png"
background-color = "#ECEFF4"
width = 1920
height = 1080

[fractal-plant]
    [fractal-plant.fp1]
    stroke-color = "#88C0D0"
    stroke-width = 1.5
    x-offset = -350
    x-centered = true
    y-centered = true

    [fractal-plant.fp2]
    stroke-color = "#D08770"
    stroke-width = 1.5
    x-offset = 350
    x-centered = true
    y-centered = true
    mirror = true

Example 2

# config.toml
[general]
output-file = "bg2.png"
background-color = "#ECEFF4"
width = 1920
height = 1080

[fractal-plant]
    [fractal-plant.fp1]
    stroke-color = "#88C0D0"
    stroke-width = 1.5
    x-centered = true
    y-centered = true

Example 3

# config.toml
[general]
output-file = "bg3.png"
background-color = "#000000"
width = 1920
height = 1080

[fractal-plant]
    [fractal-plant.fp1]
    stroke-color = "#88C0D0"
    stroke-width = 1.5
    x-offset = -350
    x-centered = true
    y-centered = true

    [fractal-plant.fp2]
    stroke-color = "#D08770"
    stroke-width = 1.5
    x-offset = 350
    x-centered = true
    y-centered = true
    mirror = true

[fractal-binary-tree]
    [fractal-binary-tree.fbtree1]
    stroke-color = "#EBCB8B"
    stroke-width = 1.2
    y-offset = 75
    x-centered = true
    y-centered = true

bgmaker's People

Contributors

hvlds avatar

Watchers

 avatar

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.