Image composed by tiles images in js or php?
Any of you remember that trend of composing one main image using a lot of small images?
I remember Uniqlo website used to have that tecnique, and many more Flash-based website.
Do you think this is doable in JavaScript? My goal is to translate a very simple B&W bitmap, like a letter "Q" for instance, m开发者_Python百科ade of other images taken randomly from a db...
Any advice on how to start this project? What should I look for?
Thanks.
Ah the old image-made-of-smaller-images trick. Should be very doable. Especially in black and white.
-You want each mini-image to blur into essentially a light-or-dark approximation. It's a b&w pixel right? So you need some overall luminosity metric for each small image, say 1 to 255 or 1 to 100. If it's in a DB you can generate it ahead of time in a language more suitable to image processing.
-Then you need an algorith for breaking up your big image into smaller things. I would suggest that the forte of Javascript is not image matrix processing. You need a library to convert letters into bitmaps. There are lots of old school libraries that make letters into ASCII art. You might piggyback off one of these. You need to get luminosity metrics from each of these little pieces, like the letters that make up the ascii art.
-When you have metrics for both, pair 'em up and generate a table. We all used to use tables with border width=0, shouldn't be too hard to generate in JS.
精彩评论