Menu

#31 bug in LE32 abmp resources

open
nobody
None
5
2004-06-17
2004-06-17
No

The endianness is wrong on -LE32 bitmap resource
palette entry counts. In fact, as far as I can tell, no
endianness conversion is done anywhere in the palette
generation code.

Discussion

  • Alexander R. Pruss

    Logged In: YES
    user_id=756930

    Moreover, there needs to be two bytes of padding after this
    count.

     
  • Alexander R. Pruss

    Logged In: YES
    user_id=756930

    A fix that worked for me was to change the
    *tmpPtr++ = 0x01;
    *tmpPtr++ = 0x00;
    in bitmap.c:BMP_ConvertWindowsBitmap() to:
    if ( vfLE32 ) {
    *tmpPtr++ = 0x00;
    *tmpPtr++ = 0x01;
    *tmpPtr++ = 0x00;
    *tmpPtr++ = 0x00;
    }
    else {
    *tmpPtr++ = 0x01;
    *tmpPtr++ = 0x00;
    }

    Unfortunately, I guess, this only fixes things for .bmp
    inputs. I don't know enough about the pilrc code to change
    it for other kinds of inputs.

    I've tested this with the Clie Simulator in generating Graffiti
    skins, and after this little fix (and the other fix in my other
    bug report) 8-bit skins with palettes now work.

     
  • chrilith

    chrilith - 2005-12-25

    Logged In: YES
    user_id=637029

    Hi,

    Also :
    BITMAP ID 3100 "keyCommand.bmp" DENSITY 2

    doesn't seem to generate the DENSITY 2 bmp.

    But defined as this, it works :
    BITMAP ID 3100
    BEGIN
    BITMAP "keyCommand.bmp" BPP 1 DENSITY 2
    END

    But the bitmap data is wrong (seems to be shifted)

     

Log in to post a comment.