Cross-platform SDK and HTML5 tools for mobile app development
X
 
6 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

arron lee
arronlee's picture
Offline
Joined: 21 Jun 2013
Posts:
I am not an expert. But I

I am not an expert. But I think you can google an image converter tool to help you with yourwork. I suggest you check its free trial package first. I hope you success. Good luck.

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

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!

Davide Mari
DavidSeas's picture
Offline
Mobile Conjurer
Joined: 10 May 2012
Posts:
Just to be more clear, my

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?

Augustus lee
Augustus's picture
Offline
Joined: 27 Jun 2013
Posts:
No matter the source file is

No matter the source file is displayable image or data object, as mentioned by "arron lee", you can apply and use an image converting application to convert and send the image via http. This is what I haved got from your post, if im not right, hmm, try to get more help.

cathyhill345
cathyhill345's picture
Offline
Joined: 13 May 2013
Posts:
And what data type you want

And what data type you want to convert the image into, byte or stream? Actually, you can find some free source code at stackoverflow forum.

http://stackoverflow.com/questions/5420384/convert-an-image-into-binary-data-in-javascript

Login or register to post comments