This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Image | |
import glob, os, sys | |
counter = int(sys.argv[2]) | |
def aging(filename, counter): | |
image = Image.open(filename) | |
image.save(filename, "JPEG", quality=10) | |
counter = counter - 1 | |
if counter>0: | |
aging(filename, counter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>fullpage</title> | |
<script> | |
window.onload = function() { | |
var body = document.getElementsByTagName('body')[0]; | |
body.addEventListener("click", openFullPage, false); | |
function openFullPage(e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Modified from SVG Stipple Generator, v. 2.02 | |
Copyright (C) 2012 by Windell H. Oskay, www.evilmadscientist.com | |
Full Documentation: http://wiki.evilmadscience.com/StippleGen | |
Blog post about the release: http://www.evilmadscientist.com/go/stipple2 | |
An implementation of Weighted Voronoi Stippling: | |
http://mrl.nyu.edu/~ajsecord/stipples.html | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Modified from SVG Stipple Generator, v. 2.02 | |
Copyright (C) 2012 by Windell H. Oskay, www.evilmadscientist.com | |
Full Documentation: http://wiki.evilmadscience.com/StippleGen | |
Blog post about the release: http://www.evilmadscientist.com/go/stipple2 | |
An implementation of Weighted Voronoi Stippling: | |
http://mrl.nyu.edu/~ajsecord/stipples.html | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PImage img; | |
float scaleValue; | |
float diff; | |
float SCALE_VALUE_MIN = 1.0; | |
float SCALE_VALUE_MAX = 3.0; | |
float EASE_VALUE = 0.2; | |
void setup() { | |
img = loadImage("image.jpg"); | |
size(img.width, img.height); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PImage imgA, imgB; | |
float transparency; | |
float targetTransparency; | |
boolean isFadeAtoB; | |
boolean isFadeCompleted; | |
int currentTime; | |
int fadeCompletedTime; | |
float easing; | |
void setup() { | |
imgA = loadImage("a.jpg"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
var buttons: [UIButton] = [] | |
var notes: [AKNote] = [] | |
let soundFiles: Array<String> = ["BassC1", "FluteC2", "glockA1", "musicboxC1", "newharpC1", "pianoguitarA2"] | |
func prepareSounds() { | |
for (index, soundFile) in enumerate(soundFiles) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var layers = app.activeDocument.layers; | |
convertToShapeLayer(layers); | |
function convertToShapeLayer(layers) { | |
for(var i=0,layersLength=layers.length; i<layersLength; i++) { | |
var layer = layers[i]; | |
if(layer.typename == "LayerSet") { | |
convertToShapeLayer(layer.layers); | |
} else { | |
if(layer.kind == LayerKind.TEXT) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PImage img = loadImage("noise_bw.png"); | |
PImage out = createImage(img.width, img.height, ARGB); | |
img.loadPixels(); | |
out.loadPixels(); | |
for(int i=0; i<img.width; i++) { | |
for(int j=0; j<img.height; j++) { | |
color c = img.pixels[j+i*img.width]; | |
float a = brightness(c); | |
out.pixels[j+i*img.width] = color(255, 255, 255, a); | |
} |