BinFileReader.js: Ajax Mosaic Image Builder

Andy Na has written a mosaic builder that uses BinFileReader.js JavaScript library to be able to work with binary files with Ajax. The function will load multiple images as a color pallet using BinFileReader and then arranged them in such an order that those images would look like one of the images in the pallet. […]

Andy Na has written a mosaic builder that uses BinFileReader.js JavaScript library to be able to work with binary files with Ajax. The function will load multiple images as a color pallet using BinFileReader and then arranged them in such an order that those images would look like one of the images in the pallet. And you can also click on one of the small images to rearrange the images to build that image.

If you wish to increase the speed, you may want to sort the pallet and then implement a better search algorithm when it looks for an image with the closest brightness.

And if you wish to run this script with your own set of images, please make sure all the images are

  1. 24 bits per pixel, uncompressed BMP files
  2. gray scaled
  3. small
var demo = new MosaicBuilder("60x45" /* image name prefix */, 23 /* number of image files */); demo.buildMosaic("60x45.bmp" /* image name */);

More info: Ajax mosaic builder

Ajax, JavaScript, Mosaic, Mosaic Builder, Binary