maGetImageData failed on android 1.5

4 posts / 0 new
Last post
michael
michael's picture
Offline
Mobile Conjurer
Joined: 13 Aug 2010
Posts:
maGetImageData failed on android 1.5

Hi, all:

I programed a test to scale an image on android 1.5.
I got the data of a png image, and printed , all of the data is 0.
I don't know how to resolve it:

MAHandle newImage = maCreatePlaceholder();
MAExtent textureSize = maGetImageSize(maHandle);
int sTextureWidth = EXTENT_X(textureSize);
int sTextureHeight = EXTENT_Y(textureSize);
int *texture = new int [sTextureWidth*sTextureHeight];
MARect srcRect = {0, 0, sTextureWidth, sTextureHeight};
maGetImageData(maHandle, texture, &srcRect, sTextureWidth);
for (int i = 0; i < sTextureWidth*sTextureHeight; i++) {
printf("i = %d", texture[i]);
}
My Mosync is r1853.

maGetImageData is right on symbian and java but android is wrong.

I am not good at English, can you understand me ?

thanks for your help!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
michael
michael's picture
Offline
Mobile Conjurer
Joined: 13 Aug 2010
Posts:

maGetImageSize() sometimes also failed

Anders Malm
andersmalm's picture
Offline
Mobile Conjurer
Joined: 28 Aug 2008
Posts:

Hi Michael!

I have seen a problem there in the runtime which I will look into. I will post which revision that is fixed in. Hopefully I will be able to fix it right away.

michael
michael's picture
Offline
Mobile Conjurer
Joined: 13 Aug 2010
Posts:

hi, andersmalm:

Progress, and develop smoothly?