cancel
Showing results for 
Search instead for 
Did you mean: 

Bitmap Converter, transparency and compression

hbarta2
Associate III
Posted on April 21, 2015 at 00:30

Hi folks,

I'm using Bitmap Converter (BmpCvtST.exe, v5.26, STemWin package) to convert images for display. Ordinarily when I save I select the ''High color [565] compressed'' output format and all is well. At the moment I am working with an image that has an Alpha channel and transparent portions. When I 'Save As' that option does not come up. The closest is ''High color with Alpha [565]'' but that doesn't work well. The image is a red X (255,0 0) and it appears black (but the transparency part works.) The option that provides the visual results I like (Red X, background otherwise visible ) is when I save with the option ''True color with alpha channel'' but it uses gobs of flash since it is not compressed. I have tried''True color with alpha channel, compressed'' and nothing appears when the code issues the call to draw the image. Is there any to draw a compressed image with transparency on the LCD? The LCD is configured for 16 bit (565) color. Here is what the code looks like:

case ID_BUTTON_1: // Notifications sent by 'Submit'
switch(NCode) {
case WM_NOTIFICATION_CLICKED:
// USER START (Optionally insert code for reacting on notification message)
hItem = WM_GetDialogItem(pMsg->hWin, ID_IMAGE_2);
IMAGE_SetBitmap(hItem, &bmRedX);
// USER END
break;
case WM_NOTIFICATION_RELEASED:
// USER START (Optionally insert code for reacting on notification message) 
hItem = WM_GetDialogItem(pMsg->hWin, ID_IMAGE_2);
IMAGE_SetBitmap(hItem, &bmclear);
// USER END
break;
// USER START (Optionally insert additional code for further notification handling)
// USER END
}
break;

bmRedX

is the bitmap image with transparency and

bmclear

is a 1x1 pixel transparent image. When the button is touched, the image appears and when the button is released it is removed. Thanks!
0 REPLIES 0