Palletized mode

This is a discussion on Palletized mode within the Windows Programming forums, part of the Platform Specific Boards category; Hi,buddy: I got a book and it says that in the palletized modes,8 bits represent each pixel ,problem is that ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    173

    Unhappy Palletized mode

    Hi,buddy:
    I got a book and it says that in the palletized modes,8 bits represent each pixel,problem is that if we get over 8 bits,e.g:16 bits,how could we still use palletized mode?

    Thx

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Palettes are actually preset. I'm not familiar with the mode you are talking about but if it only allows 8-bit colors then you can't use 16-bit colors. Either windows will degrade the color down to 8-bit (which would supprise me), or you would get an error (much more likely). If it says 8-bit then just use 8-bit.

  3. #3
    Registered User lobo's Avatar
    Join Date
    Oct 2001
    Posts
    71
    eh, is it possible to use palettized mode in with 16-bits desktop depth at all?

  4. #4
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463
    Use CreatePalette / SelectPalette.

    To do the coloring of specific elements, I use to manipulate the COLORREF structure, which expects 4 bytes (0xIIRRGGBB) RGB( INTENSITY, RED, GREEN, BLUE ), you can set pixels up to 24 bits colordepth. Intensity byte has to be left 0.

    Just to give you an idea, red, green and blue components can be modified through masking techniques (bitwise AND "&" / OR "|" and SHift Left "<<" SHift Right ">>"), which let you make some cool effects, too.

    Have fun!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. console mode and service mode
    By George2 in forum C# Programming
    Replies: 0
    Last Post: 06-01-2008, 01:42 AM
  2. Shortening main
    By pdstatha in forum C Programming
    Replies: 1
    Last Post: 04-03-2002, 03:56 PM
  3. Showing the directory sturcture
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 03-26-2002, 03:46 PM
  4. free() usage
    By pdstatha in forum C Programming
    Replies: 5
    Last Post: 03-13-2002, 08:28 AM
  5. Implementing "ls -al"
    By pdstatha in forum C Programming
    Replies: 7
    Last Post: 03-06-2002, 04:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21