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
Developer
ghuyfel
Posts: 19
Registered: ‎02-09-2014
My Device: BlackBerry Z10
My Carrier: Telkom SA

Save a picture into a file

Hi all, 

I've seen lot of tutorials on how to save "text" in a "text" file (eg: myFile.txt)

What i want to know is how to save an "image" in a "text" file (eg: save myImage.png in myFile.doc)

 

Is it possible?

 

Thanks in advance for your replies. :smileyhappy:

Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Save a picture into a file

There is nothin special about a text file it can be thought of as just a stream of bytes and therefore easily read by code and apps.

 

A doc file is usually associtaed with Microsoft word and has special encodings in order to layout the text and pictures so no there are no APIs for creating Word documents, there are a few opensource libraries though that you be able to use.

 


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
ghuyfel
Posts: 19
Registered: ‎02-09-2014
My Device: BlackBerry Z10
My Carrier: Telkom SA

Re: Save a picture into a file

Hi, thanks for your answer, but is there an other file format that I can save those pictures in? I thought about html but that will just display them and not "store" them in the file itself...
Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Save a picture into a file

Why is it you can't save them as PNG, what is it you are trying to do?

If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
ghuyfel
Posts: 19
Registered: ‎02-09-2014
My Device: BlackBerry Z10
My Carrier: Telkom SA

Re: Save a picture into a file

I have a list made of text and pictures. I would like to export the list as a file and share it (over BBM email etc)
Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Save a picture into a file

Creating an email message with text and images is easy to do

 

https://supportforums.blackberry.com/t5/forums/searchpage/tab/message?filter=labels%2Clocation&locat...


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Save a picture into a file

[ Edited ]

BBM not so much,

 

https://supportforums.blackberry.com/t5/Native-Development/Share-text-and-photo-for-the-same-invocat...


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
ghuyfel
Posts: 19
Registered: ‎02-09-2014
My Device: BlackBerry Z10
My Carrier: Telkom SA

Re: Save a picture into a file

Thanks, I'll read those and tell if it helped. thanks again
Please use plain text.
Developer
BojanKogoj
Posts: 76
Registered: ‎01-08-2013
My Device: Z10 LE
My Carrier: SiMobil

Re: Save a picture into a file

Out of curiosity, why can't you use .zip? It will store multiple images, and there is some reference that I have no idea how to use: Zip, unzip

Please use plain text.
Developer
ghuyfel
Posts: 19
Registered: ‎02-09-2014
My Device: BlackBerry Z10
My Carrier: Telkom SA

Re: Save a picture into a file

That's a good idea too, I can make an html with all the pictures grouped into a folder and zip the whole thing... now I will be to pray that the receiving device can open zip And html files...
Please use plain text.