dcsimg
A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: 16 bit bitmap?

  1. #1
    Junior Member
    Join Date
    Apr 2002
    Posts
    4
    I'm trying to implement a 16 bit bitmap (already got 8bit ones working).
    Im using:
    tag20
    UI16(bitmapid)
    UI8(4)......................(4 = 16 bit)
    UI16(bitmapwidth)
    UI16(bitmapwidth)
    UI16(255)...................(255 colors in table)
    ColorTableRGB...............(3 bytes for R,G,B times 255)
    BitmapData

    I'm assuming that the bitmap data is 2 bytes per color indice. I'm using 255 colors all up but all I'm getting in the SWF is a BLACK screen.

    Is there something i'm doing wrong? do 16 bit images still use color indices? are there any quirks with bitmaps that i'm missing?

    (Note: the same code works for 8 bit bitmaps if I use "3" for the bitmap format)

    Any help or ideas would be greatly appreciated (please dont say to use a 3rd party product).

  2. #2
    Senior Member
    Join Date
    Feb 2001
    Posts
    140
    I don't like the 16 bit bitmaps, they gave me a heap of trouble if i remember. I don't think flash exports 16 bit bitmaps , only 32 and 8 bit. maybe Version 3 exported 16 bit.

    I always just use either 8 or 32 bit

  3. #3
    Junior Member
    Join Date
    Apr 2002
    Posts
    4
    So does the Flash Player actually support 16 bit bitmaps defined as type 4 for tag20?
    [Edited by neville5 on 04-07-2002 at 09:31 PM]

  4. #4
    Senior Member
    Join Date
    Feb 2001
    Posts
    140
    yes they are supported, but as i said i'd stick to 32bit,

  5. #5
    Junior Member
    Join Date
    Apr 2002
    Posts
    4
    Well 32 bit images are very easy to use. There must be something undocumented for 16 bit bitmaps - i've checked out ming, flashsource, buckoo etc and all use the same/similar 16 bit bitmap code so I would expect they have problems as well. Anyone got 16 bit bitmaps to work?

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Posts
    126
    I've never managed to make 16 bit work in JavaSWF either.

    However, the ZLIB compression used in lossless bitmaps in SWF probably makes 32 bit images just as small as the equivalent 16 bit version.


  7. #7
    Senior Member
    Join Date
    Feb 2001
    Posts
    140
    Originally posted by nmain
    I've never managed to make 16 bit work in JavaSWF either.

    However, the ZLIB compression used in lossless bitmaps in SWF probably makes 32 bit images just as small as the equivalent 16 bit version.

    I agree, there is no real advantage of using 16 bit over 32 bit (or even 8 bit) . I have been able to pharse 16 bit , i'll look over the code and see if there's anything that will help.

  8. #8
    Junior Member
    Join Date
    Apr 2002
    Posts
    4
    Actually according to the SDK documentation 16bit (as well as 8bit) are palette based so the images should be smaller than 32 bit which takes 3 bytes per pixel rather than 16bits 2 bytes per pixel. The main effect will be in the amount of memory used during playback of the bitmap which can be an important factor (32bit will take up twice as much).

  9. #9
    Junior Member
    Join Date
    May 2002
    Posts
    1
    Why do you want to use 16 bit lossless images if you are only using 256 colors?

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

HTML5 Development Center