Results 1 to 4 of 4
  1.    #1  
    I am writing a program for treo600, but encountered a problem when trying to draw 16bit color bitmap on screen.

    here's the code:

    UInt16 libRef;
    UInt32 depth = 0x0000808A;
    Boolean color = true;

    WinScreenMode(winScreenModeSet, NULL, NULL, &depth, &color);

    SysLibLoad('libr', 'imgL', &libRef);
    bmp = ImageLibImageBitmapCreate(libRef, 0, &err);
    WinDrawBitmap(bmp, 0, 16);
    ImageLibBitmapDelete(libRef, bmp);
    SysLibRemove(libRef);

    The original picture is shown in attachment screen22.png, but I always get the result of screen21.png. I have tried different color depth parameter in WinScreenMode function, including 0x00008000 and 0x00000800(12bit color), but got the same result. What's wrong with my code? anyone can help? Thanks in advance.
    Attached Images Attached Images
  2. #2  
    Quote Originally Posted by UGlee
    UInt16 libRef;
    UInt32 depth = 0x0000808A;
    Boolean color = true;

    WinScreenMode(winScreenModeSet, NULL, NULL, &depth, &color);

    SysLibLoad('libr', 'imgL', &libRef);
    bmp = ImageLibImageBitmapCreate(libRef, 0, &err);
    WinDrawBitmap(bmp, 0, 16);
    ImageLibBitmapDelete(libRef, bmp);
    SysLibRemove(libRef);
    Something is missing. When do you populate the bmp with color data?

    Also, bitmaps created by the imagelib should be drawn by the imagelib. See the notes in imagelib.h. Search for the word opaque.

    H
  3. #3  
    Quote Originally Posted by UGlee
    I am writing a program for treo600, but encountered a problem when trying to draw 16bit color bitmap on screen.

    here's the code:

    UInt16 libRef;
    UInt32 depth = 0x0000808A;
    Boolean color = true;

    WinScreenMode(winScreenModeSet, NULL, NULL, &depth, &color);

    SysLibLoad('libr', 'imgL', &libRef);
    bmp = ImageLibImageBitmapCreate(libRef, 0, &err);
    WinDrawBitmap(bmp, 0, 16);
    ImageLibBitmapDelete(libRef, bmp);
    SysLibRemove(libRef);

    The original picture is shown in attachment screen22.png, but I always get the result of screen21.png. I have tried different color depth parameter in WinScreenMode function, including 0x00008000 and 0x00000800(12bit color), but got the same result. What's wrong with my code? anyone can help? Thanks in advance.
    use

    UInt32 depth = 16;

    make sure the original picture is in 16 or 24 bit.
    Want mp3/wav ringtones , Audio and Video recording for your Treo600/650? visit www.toysoft.ca
  4. #4  
    hi, I am now using the ImageLib library.. but in my simulator there is no prc file for ImageLib . anyone Know from where can I get the prc file. Or suggest me an alternate way to run the imageLib functions...

Posting Permissions