Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

I have an application where the loading image is an animated png which sits on top of a transparent image (both of which sit on top of a background image). In the simulator, when animation starts, it 'tears' the background image behind it. I thought this was a simulator issue at first. However, on some (physical) phones this doesn't happen, and on others it does. Also, on some phones, the png isn't resized correctly, and others the png is resized correctly (even though when debugging, the IIMAGE_SetParm call seems to work, based on the new png size).
I think this is a bug in BREW, but I'm not completely sure. Below are the relevant code snippets. Thanks.

InitAppData

// load 24 loading icons (stored as one image)
pLoadingImage = ISHELL_LoadImage(a.m_pIShell, "loading.png");
IIMAGE_GetInfo(pLoadingImage, &imageInfo);
IIMAGE_SetParm(pLoadingImage, IPARM_SCALE, (DeviceInfo.cxScreen * imageInfo.cx) / (24 * MAX_SCREEN_WIDTH),
(DeviceInfo.cxScreen * imageInfo.cy) / MAX_SCREEN_WIDTH);
//IIMAGE_SetFrameSize(pLoadingImage, (DeviceInfo.cxScreen * imageInfo.cy) / (24 * MAX_SCREEN_WIDTH));
IIMAGE_SetFrameCount(pLoadingImage, 24);
IIMAGE_SetAnimationRate(pLoadingImage, 75);

Inside the class using pLoadingImage... constraints have already been set up

IWIDGET_SetImage(pLoadingWidget, pMe->pLoadingImage);
ICONSTRAINTCONTAINER_Insert(pIConstraintContainer, pLoadingWidget, WIDGET_ZTOPMOST, &widgetConstraint);
IWIDGET_Release(pLoadingWidget);

IWIDGET_SetVisible(pPlateWidget, TRUE);
IWIDGET_SetVisible(pLoadingWidget, TRUE);
IWIDGET_Animate(pLoadingWidget, TRUE);