Results 1 to 3 of 3

Thread: RGB Array -> 8-bit Bitmap

  1. #1

    Thread Starter
    Addicted Member Kezmondo's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    166

    RGB Array -> 8-bit Bitmap

    I need to create one large bitmap from a number of smaller bitmaps.

    I have taken a number of separate 24-bit bitmaps and pieced the RGB values together as required into one big byte array. Using this array to create one big 24-bit bitmap is not a problem.

    But, can I take the array and somehow save the bitmap as an 8-bit or even 4-bit bitmap?

    Cheers...

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Color conversion is quite tricky, especially when going from a real color format to a palettized format. Better to leave that to the image editiong apps.

    Of course, if you really want to do it, try searching google for "color conversion algorithms"
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962
    VB can only save bitmaps in 24 bit color. If you wish to save the picture in less, you must first convert it then write your own code to save it. VB doesn't care if you only use 2 colors in your bitmap, it still saves it as a 24 bit bitmap. Although this doesn't matter as a matter of display, saving it as less will save a lot of disk space.
    Involved in: Sentience

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