Giter Site home page Giter Site logo

vandemjh / tiling Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 7.04 MB

Redraws a given picture, built from the ground up with PHP and vanilla JS

Home Page: https://jack-tiling.herokuapp.com/

PHP 43.48% JavaScript 25.45% Python 19.27% CSS 0.99% HTML 10.81%
graphics javascript php

tiling's Introduction

Tiling

Tiling is an app to redraw a given picture using a variety of smaller images.

Under the hood

Python

Python scripts are used to take the average RGB value of every pixel in an array of images. The results are output in JSON which is used later on the client side.

PHP

On the server, PHP is used to try to create an image object from the URL. If that fails, the image is downloaded and converted to a png. Next, each pixel of the image is read and output to the client in JSON.

JavaScript

A Canvas element is used to display the closest image for each pixel, determined by the average RGB values.

Average Pixel JSON

The average pixel files are JSON in the following format:

{
"link to image" : [average red, average blue, average green],
...
}

Examples

before

after

tiling's People

Contributors

vandemjh avatar dependabot[bot] avatar

Stargazers

Lorem Ipsum avatar  avatar  avatar

Watchers

 avatar  avatar

tiling's Issues

Add a nice landing page

  • Space to choose what format you would like to use (pokemon, greyscale, etc)
  • Select pixel density
  • Some example images to load

Improve scalability

  • Python scripts overlap
  • PHP file management is a bit confounded
  • Add descriptive folders

Add Python buildpack

Python buildpack will allow easier:

  • Generation of test images
  • Image averaging
  • ...

Add image upload option

As a user, I would like to upload my own image which is oftentimes easier on mobile than copying and pasting a link to an image.

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.