ofxDither - dithering for OF

ive been experimenting with dithering algorithms for their old-school 1-bit aesthetic and have put it together into a addon on github, ofxDither => https://github.com/julapy/ofxDither.

i had some help for jesús gollonet and you should also check out his ofxHalftone addon => https://github.com/jesusgollonet/ofxHalftoner.

below are a some gif loops ive created with ofxDither and source is also included below.
[attachment=0:2z6itu9a]110309_dither_examples.zip[/attachment:2z6itu9a]

also put up a blog post about the experiments => http://www.julapy.com/blog/2011/03/09/ofxdither/

110309_dither_examples.zip

1 Like

nice!

cool!!!

this is great.

i am using this on line video and for some reason the first 10 or so horizontal pixels jitter.
i am trying to figure out if it is some pixels array or image not being cleared …

i even get it when i feed the imageIn with a solid color image.

this is being updated every frame.

any ideas?

this change in ofxDither.cpp int the prepImagesForGreyscale function seems to have fixed the problem.

for some reason imageIn.getPixelsRef() cause the pixel jitter.

  
  
	//--- image in.  
   // cout<<"imageIn.bpp "<<imageIn.bpp<<endl;  
	if( imageIn.bpp == 8 )	// already greyscale.  
	{  
		imageInPixels = imageIn.getPixels();  
	}  
	else					// convert to greyscale.  
	{  
        imageIn.setImageType(OF_IMAGE_GRAYSCALE);  
		//ofImage imageInBW;  
        // imageInBW.setFromPixels( imageIn.getPixelsRef());  
		//imageInBW.setImageType( OF_IMAGE_GRAYSCALE );  
		  
		imageInPixels = imageIn.getPixels(); // imageInBW.getPixels();  
	}