Close
Showing results 1 to 10 of 36

Thread: WoW Mosaics

Threaded View

  1. #34

    Default

    Quote Originally Posted by thmsn View Post
    Thats pretty cool, how do you map each icon to the color of a pixel?, I haven't worked much with image manipulation so this is rather interresting
    The way i do it (which is not exactly very smart) is that for each icon of the pool I have, i pick a number of sample pixels and average them.

    For example, for each icon that is 21x21 (441 pixels) i pick ~30-40 pixels at regular intervals and for each i record the Red, Green and Blue values.
    Then I average up all reds, all greens and all blues separately and I get my average RGB color for that icon.

    I store all that info in a database, and then, when i parse the pixels of the image to render, i select the 'closest' matching icon by comparing the R, G and B values.
    the closest is basically the one with the smallest difference = ( (Abs(Ricon - Rimage) + Abs(Gicon-Gimage) + Abs(Bicon-Bimage) )

    As I said, not exactly very precise, but it work reasonably so far. In a future version i might try and map areas (left, top, right, bottom) and have separate RGB averages for each of those to try and make the images smoother. But it feels like alot of work and I can't be asked so far ;-)
    Last edited by Zub : 04-23-2010 at 02:58 AM
    .[I



Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •