April 20, 2008
1:31 am

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

Loading

Contextual Related Posts:

No followup yet

Leave a Response

Comment Preview
« Busy.js: Loading indicators with overlay CanvasCSS Gradients »
Feed Icon

Subscribe via RSS or email: