Code Monkey home page Code Monkey logo

blendit's Introduction

blendit

Blend images with text and generate amazing looking posters.

Build

Install Rust if you haven't done it yet.

Clone this repository in a new directory and cd into it.

git clone https://github.com/alexvilanovab/blendit
cd blendit

Compile the project using --release flag so that it is fully optimized.

cargo build --release

That's it! You will be able to find the compiled binary at target/release/blendit.

Usage

USAGE:
    blendit [OPTIONS] <IMG> <TXT>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -f, --font-size <UINT>    Font size used when generating the poster [default: 24]
    -o, --output <IMG>        Where you want to save the JPEG with the generated poster [default: ./output.jpg]

ARGS:
    <IMG>    Image you want to blend
    <TXT>    Text file you want to blend

How to get better results

  • Use small images (~150x150px works good!). Have in mind that each pixel of the original image will be replaced by a character of 24x24px (if font-size argument is not specified).

  • Make sure that the images you use do not contain pure dark pixels. This would imply rendering a black character in a black background; hence, the character would not be visible.

Ideas for future implementations

  • Automatically resize and apply the needed color modifications to the original image in order to get a good result no matter how big or how dark it is.

  • Add a configuration argument that applies a hue color to the generated poster. This looks really good, specially on grayscale images.

Motivation

Even though I never published it I actually made exactly this same project using Processing back in 2017.

It wasn't until I found out about emosaic that I decided to port it to Rust.

By the way! these are my first lines of code using Rust so don't expect everything to be perfect.

blendit's People

Contributors

alexvilanovab 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.