question on image resolutions

14 views
Skip to first unread message

Ofer Goren

unread,
Aug 8, 2022, 10:55:41 AM8/8/22
to android-ndk
Hi.
Using Android NDK, I'm requesting a JPEG image with resolution of 384*256. I'm creating a reader for that request, and wait for the reader to finish processing and trigger the registered callback with the data pointer and the length. In the reader callback, I call 
AImage_getWidth(image, &imgW);
AImage_getHeight(image, &imgH);
And indeed I get 384 and 256 respectivly.
Then for debugging proposes, I dump the buffer into the file system and pull it to my PC as a JPEG file. I then open it using a photo editing SW, and check the resolution. The reported resolution is 352*288. There are 32 less pixels on the H dimension, and 32 more on the W dimension.
My questions:
1. Why is that?
2. Where can I find what are the supported resolutions that android provides?

Thanks!
Ofer
Reply all
Reply to author
Forward
0 new messages