Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Posts: 33
Registered: ‎01-02-2012
My Device: 9900

SAVING AN IMAGE TO JSON, AND RECALLING IT BACK FOR USE

Hello,

how would you be able to use the camera, capture an image and save it to the json file base and then recall it back for the use in application. I think Json cannot do that because-> if so please let me know the steps for the procedure.

Thanks,

Happy holidays,

 

Developer
Posts: 1,626
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: SAVING AN IMAGE TO JSON, AND RECALLING IT BACK FOR USE

you can encode a QByteArray toBase64();

https://developer.blackberry.com/cascades/reference/qbytearray.html#toBase64

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 526
Registered: ‎05-17-2009
My Device: 9900

Re: SAVING AN IMAGE TO JSON, AND RECALLING IT BACK FOR USE

Why would you ever want to use json for this? Why not just save the image to an image format?
Like all of my posts