i am displaying an Image on screen when there is an incoming call. Although i am getting the event of incoming call in my App, But it TAKES TIME TO LOAD IMAGE. Should i use "CDirectScreenAccess" instead.
My code for displaying image, in the Constructor is:
RWsSession& wsSession = CEikonEnv::Static()->WsSession();
iWindowGroup = RWindowGroup(wsSession);
LoadData(); //Function to load Image
And then i am drawing the Image in Draw() function
In LoadData Function, i am reading an image(jpeg) from a file, the path of which is already stored in my database, and returning a bitmap using "convert" function of CImageDecoder class. I think this conversion is taking time.
But i have to display the image instantaneously when the phone rings.
but in case i use CActive, then what should i have in RunL() and where should i return my scaled bitmap..
One thing more, when there is an incoming call, before showing the selected image there occurs a white background having size "my Rect" for a while.
And then the image is shown. How to remove that white background.
I am using RWindowGroup. And in Appui i am sending my app in background. then in container constructor i am using SetOrdinalPosition()
basically in your run you would call the function that handleds the bitmap, basically you could define a callback funtion that you cann with the scaled bitmap.
The wait background is propably drawn untill your image is ready.
Basically what I meant with the scaling earlier, was that you should scale the image before saving it, so using Load function for the mbm would be enough in the application. In case you are loading non-scaled image for showing, just don't scale it anymore, use the draw function in gc to draw them into thye desired rect. The scaling basically would only be used to minimize the size of the mbm, and thus making it faster to load.
Also if you simple call load before drawing, you should have valid image before the draw gets called, and the white background should go away.
no I meant that, make the active object scaler as a separate components, that is using a interface definition as a callback to the component that requires the bitmap object. And use the callback interface function to set the bitmap to the component, or at least to indicate it that the scaling is finalized.