Cross-platform SDK and HTML5 tools for mobile app development
X
 
3 posts / 0 new
Last post
Davide Mari
DavidSeas's picture
Offline
Mobile Conjurer
Joined: 10 May 2012
Posts:
Convert Image to data

Hi All,

I explain my problem, there is a way to convert an image displayable in a data object. in other word does exist the opposite of maCreateImageFromData?

Thanks

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Davide Mari
DavidSeas's picture
Offline
Mobile Conjurer
Joined: 10 May 2012
Posts:

Just to be more clear, my purpose is to send an image via http. This image is taken via capture API (not camera API) so it's not a data object, it's a displayable image. How can i perform this?

gerdodel
gerdodel's picture
Offline
Mobile Conjurer
Joined: 20 Mar 2012
Posts:

Look at this: http://www.mosync.com/content/send-image-using-http-post#comment-13318

//get the global handle
int iSizeImg=maGetDataSize(theHandle);
char *rawData=new char[iSizeImg];
maReadData( theHandle , rawData, 0, iSizeImg);

this works!