Results 1 to 5 of 5

Thread: Looking for Colors

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2002
    Location
    Miami,FL
    Posts
    34

    Question Looking for Colors

    How do i find out if a specific color in a tile thats 16 x16. I know u can use GetPixel but that only checks for one pixel. I want to check the entire tile for it.

    Thanks in advance
    Death is always smiling down on us, the only thing we can do is smile back

  2. #2
    Addicted Member
    Join Date
    Oct 2002
    Location
    Somewhere out in space
    Posts
    151
    You could use the getbitmapbits or getdibits functions to retreive the bit array of the tile bitmap. You can get information about those api in the MSDN or at allapi.net
    'You keep creatures in cages and release them to fight? That's sick!'

  3. #3
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    VB Code:
    1. For X = 0 To Pic.ScaleWidth
    2.     For Y = 0 To Pic.ScaleHeight
    3.         Color = GetPixel(X, Y)
    4.     Next Y
    5. Next X
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  4. #4

    Thread Starter
    Member
    Join Date
    Dec 2002
    Location
    Miami,FL
    Posts
    34

    Thanks

    Thanks
    Death is always smiling down on us, the only thing we can do is smile back

  5. #5
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Here you can find the answer to that one...

    http://www.visualbasicforum.com/t51601.html

    ...lol...

Posting Permissions

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



Click Here to Expand Forum to Full Width