Giter Site home page Giter Site logo

cadin / random-comic Goto Github PK

View Code? Open in Web Editor NEW
43.0 4.0 5.0 19.06 MB

Generate randomized comics from a collection of images

Home Page: http://cadinbatrack.com/projects/vomitComics/

License: The Unlicense

Processing 100.00%
comics creative-coding processing

random-comic's Introduction

random-comic

A Processing app to generate random comics. Comic

Getting Started

Basics

Run build.pde in Processing 3.

While the app is running, press r to randomize your comic. This will change the layout as well as the selected images.
Click any panel to change the panel image without altering the comic layout.

To save your image press the s key.
Images are saved to the output folder.

Adding Images

Images should be saved as transparent PNG files in the images folder.
Each image needs to have a identically sized and named outline image saved to the imageOutlines folder. These white outlines are placed behind images when a black panel background is used.

The default resolution for both input and output is 600 ppi. Panels are sized in increments of 0.75 inches. So a 1x1 image would be 450 x 450px.
The image resolution can be adjusted via the Config file.

Each image needs to have an entry in the assets.csv file. The minimum required data is the filename, but you can also specify a focal area (in pixels, based on a 600 ppi image), minimum number of panels for width and height, which side of the panel (if any) the image should be anchored to, whether or not the image uses a horizon line, and minimum and maximum y positions for the horizon line (in pixels, based on a 600 ppi image).

Customization

Customize the comic features by editing variables in the Config.pde file.
You can create and customize instances of Config to make it easier to switch between versions (for quickly changing resolution and margins for example).

If you want panels larger than 4x4, you'll need to draw your own frames for them.

Troubleshooting

Error: "mask() can only be used with an image that's the same size"

This error occurs when running the project configured for a 2x display on 1x display.

The easiest fix is to change line 14 in build.pde from
Config CONFIG_FULL_RES = new Config(2, 600, 0.125, 0.24, "600ppi", false);
to
Config CONFIG_FULL_RES = new Config(1, 600, 0.125, 0.24, "600ppi", false);

The first argument for Config is the pixel density. See the Config.pde file for more configuration options.

License

This project is licensed under the Unlicense - see the LICENSE file for details.

random-comic's People

Contributors

cadin avatar

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

Watchers

 avatar  avatar  avatar  avatar

random-comic's Issues

Error: mask() can only be used with an image that's the same size.

When I try building your code, I get this error

p5: booting... Loading frames... done:48 loadImageData IllegalArgumentException: mask() can only be used with an image that's the same size

It involves the "img.mask(_bgImg); on line 208 of Panel.

I managed to make the program work by deleting this line but the result is less nice!

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.