Van-Gogh-Matic

Or Jackson Bollocks, maybe?

I suck at drawing, and although I did take art courses for a couple of years, I wouldn't touch a brush for anything more artistic than painting up a wall.

I suck at digital image editing as well.  Sorry photoshop, I don't like you...  I've had my share of imagemagick tricks, though... and that's about as far as I'll go with picture art.

So, this little sucker is another attempt, I guess. :)  It will present you with a blank slate, and a button to browse your files.  Once you select a picture from your files, it wil start painting away.

It won't resize the picture, so if it doesn't fit, it doesn't fit.  It'll still paint it, but it won't be scaled.


-OR-

Try It


below, is an example of how it works.

original picture:


picture edited with imagemagick:



this image was created with the following code:
convert -flatten -despeckle -strip -colors 256 -paint 5 -blur 5 test.jpg test1.jpg


image created with Van-Gogh-Matic:


source code:

pixart.pde
 /**  
  *  VanGoghMatic<br />  
  *  Picture art auto generator.<br />  
  *  jon tohrs<br />  
  *  send me money -_-<br />  
  *  <form><input type="file" id="file-input"/></form>  
  */  
  PImage img = null;  
  int smallPoint, largePoint;  
  void draw ()  
  {  
    background(255);  
    if ( img != null ) image(img, 0,0, 640, 480);  
  }  
  void newImageAvailable ( Image i )  
  {  
   img = new PImage( i );  
  }  
 void setup() {  
  size(600, 400);  
  img = loadImage(img, 0, 0, 640, 480);  
  smallPoint = 4;  
  largePoint = 40;  
  imageMode(CENTER);  
  noStroke();  
  background(255);  
 }  
 void draw() {  
  float pointillize = map(mouseX, 0, width, smallPoint, largePoint);  
  int x = int(random(img.width));  
  int y = int(random(img.height));  
  color pix = img.get(x, y);  
  fill(pix, 128);  
  ellipse(x, y, pointillize, pointillize);  
 }  

reader.js
 window.onload = function () {  
   tryFindSketch();  
 }  
 function tryFindSketch() {  
   var sketch = Processing.getInstanceById(getProcessingSketchId());  
   if ( sketch == undefined )  
     return setTimeout(tryFindSketch, 200); // retry soon  
   sketch.console = console;  
   initUploader(sketch);  
 }  
 function initUploader ( sketch ) {  
   var uploadField = document.getElementById("file-input");  
   uploadField.onchange = function (e) {  
     e.preventDefault();  
     var file = uploadField.files[0];  
     var reader = new FileReader();  
     reader.onload = function (event) {  
       var img = new Image();  
       img.onload = function (event2) {  
         sketch.newImageAvailable(img);  
       }  
       img.src = event.target.result;  
     };  
     reader.readAsDataURL(file);  
     return false;  
   }  
 }