Skip to content

Instantly share code, notes, and snippets.

PImage img;
void setup() {
size(800,800);
background(255);
smooth(8);
// image size 300x300
// http://hqwallbase.com/images/big/natalie_portman_actress_faces_grayscale_monochrome_wallpaper-9529.jpg
img = loadImage("natalie.png");
img.loadPixels();
PImage img;
void setup() {
size(800,800);
background(255);
smooth(8);
// image size 300x300
// http://hqwallbase.com/images/big/natalie_portman_actress_faces_grayscale_monochrome_wallpaper-9529.jpg
img = loadImage("natalie.png");
img.loadPixels();
@tsulej
tsulej / Collab_generateme.pde
Last active December 3, 2015 12:44
Generate Me collab entry
// Code by @MetaGlitch
// Modified by Generate Me
float fps = 16.666;
int inFrames = 15;
int outFrames = 15;
int otherFrames = 90;
int numFrames = inFrames + otherFrames + outFrames;
PGraphics g ;
void setup() {
size(500,500);
smooth(8);
noStroke();
fill(0);
g = createGraphics(270,270);
g.beginDraw();
g.background(255);
@tsulej
tsulej / circles.pde
Last active August 29, 2015 14:12
Vertex circles
size(1000,1000);
background(20);
smooth(8);
noFill();
stroke(240);
strokeWeight(0.7);
// outer circle
ellipse(500,500,900,900);
@tsulej
tsulej / all_bytes.sh
Created January 14, 2015 20:52
Glitching scripts
#!/bin/sh
# author: tsulej 2015 // glitching tools
# e-mail: tomeksul@gmail.com
# Script traverse through the file changes one byte and saves result. Outcome: files with changed first, second, third, ..., nth byte to choosen value
# usage:
# bash ./all_bytes.sh <filename.ext> <hex value, two letters: 0..f>
# warning: use files with small size (<20kb)
# example, suppose we have image.gif file with size 999 bytes:
# bash ./all_bytes.sh image.gif aa
@tsulej
tsulej / Image2RAW.pde
Created February 7, 2015 23:09
Convert image to RGB RAW files
/* Generate RAW files which can be sonificated and then imported to IrfanView.
* generateme.tumblr.com, 2015, v0.1.
* erros? write generateme.blog@gmail.com
*
* To use it change lines:
* img = loadImage(<insert image filename here>);
* and
* makeRaw(<filename prefix>, <channel order or gray>, <bits per pixel>, <bits per 1st channel>, <bits per 2nd channel>, <bits per 3rd channel>);
*
* Details:
@tsulej
tsulej / wzip.c
Created March 1, 2015 22:11
wzip.c v1.0 - a preprocessor for lossy data compression
/*
wzip.c v1.0 - a preprocessor for lossy data compression
Copyright (C) 1997 Andreas Franzen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
@tsulej
tsulej / wzip.pde
Created March 1, 2015 23:40
Haas transformation glitch tool :)
// wzip - a preprocessor for lossy data compression, originally: Copyright (C) 1997 Andreas Franzen
// Processing port, Tomasz Sulej, generatene.blog@gmail.com
// Haar wavelet transformation to glitch your raw images, operates on bytes, use different scaling factors (see below)
import java.io.BufferedOutputStream;
import java.io.DataOutputStream;
// CONFIGURATION, change here
String filename = "file.raw"; // file name of your raw, result saved to "res_"+filename
float scalingfactorin = 100; // compression ratio (any float)
@tsulej
tsulej / fractalify.pde
Created March 11, 2015 11:56
Make fractal using channel data as coordinates
/* Make fractal from your image
* Sketch draws mandelbrot/julia fractal using channel data to initalize/modify 'z' and 'c' variables.
* a lot of randomness here: channel selection (RGBHSB), colouring, blending, posterizing, fract type (mandel/julia), some factors
*/
// Author, Tomasz Sulej, generateme.tumblr.com
// questions? email: generateme.blog@gmail.com
/* USAGE:
* 1. set image name below and run (image should be in the same folder as sketch)